Updating Local Storage in WorkerScript
-
I see we can not use .import to access the LocalStorage namespace in a workerscript file. I want to update my local storage sqlite db in a separate thread to avoid interfering with the main gui thread. Is there a workaround?
-
As per this "doc":http://qt-project.org/doc/qt-5/qml-qtquick-workerscript.html#restrictions there's no way around.
bq. 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 through QQmlContext.
-
I guess its a job for c++
-
Yes if you are familiar with c++ go for c++ for such this job. Personally i would always opt for c++ over javascript wherever possible.