Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. CONFIG += qtquickcompiler doesn't seem to work
QtWS25 Last Chance

CONFIG += qtquickcompiler doesn't seem to work

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
qmlprecompileqtquickcompilerqt5.9
5 Posts 4 Posters 5.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Naveen_AC
    wrote on last edited by
    #1

    Hi

    I created a project in Qt Creator. Added CONFIG += qtquickcompiler to the .pro file in order to compile my .qml files in to .cpp and then compile them into the binary. When I build, I don't see any corresponding .cpp files for my .qml files in the build directory. How do I know if this is even using qtquickcompiler to compile .qml files? I don't see any sign of it in the compile output either.

    I am using Qt 5.9/msvc2015

    Marco PellinM 1 Reply Last reply
    0
    • D Offline
      D Offline
      DBoosalis
      wrote on last edited by
      #2

      I think the compiler just generates .qmlc files which are binary and not source files
      http://doc.qt.io/QtQuickCompiler/

      1 Reply Last reply
      0
      • N Offline
        N Offline
        Naveen_AC
        wrote on last edited by
        #3

        No. That is what happens if you don't use qtquickcompiler or resourcecompiler. By default, qt uses JIT compiler to convert qml into machine code on the fly, but this adds to the load time when the app is loaded first time. You can see .qmlc files in the same folder as your .qml files during run time. This is what I am trying to avoid.

        I want to use qtquickcompiler to compile during build time and add it to executable binary. But when I build, my project is using rcc.exe to compile the qml into the binary directly.

        1 Reply Last reply
        0
        • N Naveen_AC

          Hi

          I created a project in Qt Creator. Added CONFIG += qtquickcompiler to the .pro file in order to compile my .qml files in to .cpp and then compile them into the binary. When I build, I don't see any corresponding .cpp files for my .qml files in the build directory. How do I know if this is even using qtquickcompiler to compile .qml files? I don't see any sign of it in the compile output either.

          I am using Qt 5.9/msvc2015

          Marco PellinM Offline
          Marco PellinM Offline
          Marco Pellin
          wrote on last edited by
          #4

          @Naveen_AC
          I guess that Qt Quick Compiler is available for commercial license only.
          I don't know if this is the case.

          Qt 5.9 also comes with a brand new QML caching infrastructure, offering similar benefits to our users — just like the commercially available Qt Quick Compiler, but in a much more transparent way.
          (Taken from Qt 5.9 released)

          1 Reply Last reply
          0
          • P Offline
            P Offline
            Pixelgrease
            wrote on last edited by
            #5

            Release builds using the QtQuick compiler generate a qtquickcompiler_loader.cpp file and *_qml.cpp files where * matches the name of your individual *.qml files all within a ".qtquickcompiler" folder within the "build-*-Release" output folder. I verified this with a commercial license Qt 5.9.

            Debugging QML is not compatible with the QtQuick compiler; using default settings to build a Debug executable will not use the QtQuick compiler.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved