ubuntu-phone team mailing list archive
-
ubuntu-phone team
-
Mailing list archive
-
Message #01771
Re: Running QML functions in parallel thread
Hi, Mario!
I know how to use worker script, note that Nickolas asking in this "topic".
I have qml experience about 2.5 years, so il's quite easy question for me =)
19.04.13 16:05 Mario Zorz написал(а):
Hi Roman
Please note you can't access QML objects from within a WorkerScript. See this (from the same link you posted):
Restrictions
Since the WorkerScript.onMessage() function is run in a separate thread, the JavaScript file is evaluated in a context separate from the main QML engine. This means that unlike an ordinary JavaScript file that is imported into QML, the script.js in the above example cannot access the properties, methods or other attributes of the QML item, nor can it access any context properties set on the QML object throughQDeclarativeContext.
Best,
Mario
2013/4/15 Roman Shchekin <mrqtros@xxxxxxxxx>
Hi, Nick.
Look at WorkerScript, http://harmattan-dev.nokia.com/docs/library/html/qt4/qml-workerscript.html
Best wishes,
Roman.
2013/4/16 Николай Шатохин <n.shatokhin@xxxxxxxxx>
Hello.
In my code I'm creating 16x16 buttons in cycle and this take few seconds. While function that creating buttons runs, app freezes. I want to show loading animation while this function runs. So, how to run this function in parallel thread to avoid freezing?
Best regards,
Nick
--
Mailing list: https://launchpad.net/~ubuntu-phone
Post to : ubuntu-phone@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~ubuntu-phone
More help : https://help.launchpad.net/ListHelp
--
Mailing list: https://launchpad.net/~ubuntu-phone
Post to : ubuntu-phone@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~ubuntu-phone
More help : https://help.launchpad.net/ListHelp
Follow ups
References