I'm wondering if it is possible to use an async function in QML.
Like this:
async function additem(clientName){
myListModel.append({name:clientName});
}
Instead of using this:
function additem(clientName){
myListModel.append({name:clientName});
}
I've tried it and I get a syntax error: Expected token:'` and couldn't find any documentation about QML supporting JavaScript "async function".
any idea why is that? or probably if there is any other way to do async in JS which can be used in QML?
Note: I want to append data to my ListModel and I want to see it as its progress and I don't want whole application freezes until whole data appended to the model.
Appreciate your time.