[solved] QtQuickCompiler for cross-compiled Qt 5.4.2 version.

  • How do I get the QtQuickCompiler invoked by an arbitrary
    cross-compiling kit within QtCreator?

    I got the sources from Qt 5.4.2 enterprise (trail) successfully configured and cross-compiled for an embedded linux SDK (gcc 4.4.x, ARM Cortex A8 gnueabi) on a x86 linux build&host system.
    The Qt build is correctly found and listet by QtCreator for development, and I can cross-compile projects with it.

    The main issue is to get the QtQuickCompiler (qtqc) working with this particular Qt build:

    • After a "make install" for the Qt sources, there is no 'qtquickcompiler' binary anywhere in the build output, nor in the --prefix path.
    • QtCreator does not unblock the "Enable Qt Quick Compiler" option for projects that are configured to be compiled with this self-compiled Qt build, saying that this Qt Version does not support it.
    • After copying the 'qtquickcompiler' binary for the x86 gcc build (installed via QtMaintenanceTool) into the cross compilers binary path, the option above is unlocked and checkable, but a qmake + (re)build of a project utilizing QML does not call the qtqc on the resources files that are listed the .pro file.
    • The Qt is ./configured for compilation using the "-commercial" flag, and I had a trail license installed as /home/<user>/.qt-license.
    • Compiling QML projects for a x86 windows system (another Qt 5.4.2 enterprise trail) correctly calls the qtqc, which can be seen in the make's console outputs.

    Any suggestions?

  • Alright,

    the Qt Knowledge Base explains it:

    • have a commercial license.
    • copy a QtQuickCompiler executable from a downloaded commercial Qt 5.4+ installer version
      to the bin path of your self-compiled Qt installation.
    • copy qtquickcompiler.prf from the same Qt 5.4+ version to the mkspecs/features folder of the installation folder of your Qt build.
    • restart QtCreator and open your project, and the QtQuickCompiler should now be selectable.

    Eventually you get a message for a missing libQt5Core for 'qtquickcompiler',
    which indicates that the QtQuickCompiler is now about to get invoked.
    Fix the missing libs by correcting your library paths, and you should be fine.

    I hope that helps someone...

  • Lifetime Qt Champion


    Glad you found out and thanks for sharing !

    Can you provide a link to the article where you found this ?

  • The link is https://wiki.qt.io/KnowledgeBase:SupportFAQ#Qt_Tools
    You need a Qt Account to access it.

    Credits to Andy Shaw from the Qt Support Center.

  • Lifetime Qt Champion

    Thanks !

    Since you've got the information, can you please update the thread title prepending [solved] so other forum users may know a solution has been found :)

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.