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. Total newbie - is QML compiled

Total newbie - is QML compiled

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 3 Posters 1.7k Views 1 Watching
  • 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.
  • J Offline
    J Offline
    jfabiani
    wrote on last edited by
    #1

    I'm completely a newbie with QT (I have programmed in Python in the past). I know QT is normally C++ and compiled. I watched a video on the new QT 5.1 that showed QT QUICK 2.0. The interesting thing is no C++ code was written - only QT QUICK code. The question - if I create a QT QUICK only app is the app compiled? Does it run in some sort of JIT (like JavaScript). I'd like to deploy something like an '.exe'? Can that be done just using QT QUICK?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      skycrestway
      wrote on last edited by
      #2

      There is a detail blog post answering this. It is the first of a 4 part series.

      http://www.kdab.com/qml-engine-internals-part-1-qml-file-loading/

      1 Reply Last reply
      0
      • J Offline
        J Offline
        Jens
        wrote on last edited by
        #3

        The .qml files are not compiled to machine code but the qt library comes with a jit-based javascript engine included. To make a stand alone executable from qml, you can create a basic cpp application and simply point it to your qml files. The following snippet shows the minimum amount of c++ code needed to set up and run a qml application:

        @#include <QApplication>
        #include <QQmlApplicationEngine>

        int main(int argc, char *argv[])
        {
        QApplication app(argc, argv);
        QQmlApplicationEngine engine("main.qml");
        return app.exec();
        }@

        The qml files themselves can also be embedded into the executable. When deploying you would also usually ship the Qt .dlls together with your application.

        1 Reply Last reply
        0
        • J Offline
          J Offline
          jfabiani
          wrote on last edited by
          #4

          Thanks folks - the link looks like a very interesting (and educational) read.
          Johnf

          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