Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Issues when using Qt Quick Compiler (Qt 5.5.0 for Embedded)
dailydols last edited by dailydols
Are there tutorials on how to efficiently work with the Qt Quick Compiler?
Or are there recommended coding styles to get the most advantage from it?
I got the Qt Quick Compiler 3.x (later referred to as 'QtQC') running for our i.MX53 board, great (see here).
But new issues occurred concerning imports in QML and the expected performance gain, not so great.
Problem 1: It appears to have become necessary to put namespaces onto imports in QML files, even for files in the same folder. Otherwise some classes where not found on program start.
should be turned into something like
import "../common" as Common
import "./" as Local
and all used classes need to be prefixed with
After this restructuring, the program startet as if it was built without QtQC, fine.
Problem 2: No notable performance gain, the program takes about two minutes (!) until it is operable, which is about the same time as without QtQC.
Solution attempt: Maybe dynamic creation of objects with Loaders and 'createComponent' cause unclear dependencies during compile time and force the program to recompile all QML code behind the given URLs on program start?
So I removed all occasions of those and replaced them with static instances of all needed classes, so all dependencies are clear during compile time.
But still no speed-up, program still takes about two minutes to start.
The Qt Quick Compiler being a Licensed Feature, you should try to contact the Qt Company directly through your Qt Account page. You can also try the interest mailing list