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. Building Process of QML/C++
Forum Updated to NodeBB v4.3 + New Features

Building Process of QML/C++

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 3 Posters 2.8k 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.
  • Q Offline
    Q Offline
    qtd1d1
    wrote on last edited by
    #1

    Hi,

    I would like to know how the building process of a QML/C++ application works.

    This is what I know so far:
    Qt C++ build process

    • Qt creates moc files
    • Compilation of moc files to create object files
    • Linking of Object files to create the executable

    QML

    • Interpreted at runtime by QtDeclarative

    Now my questions:
    How does this work in a QML/C++ application?
    How does the C++ part communicate with the QML Part?

    Thanks

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Ad. 1. Nothing changes here.
      Ad. 2. Communication is done through Qt's Meta Object System, the very same that provides signals/ slots, method invocation in "standard" Qt.

      (Z(:^

      1 Reply Last reply
      0
      • M Offline
        M Offline
        miroslav
        wrote on last edited by
        #3

        Ad. 1. What sierdzio said.
        Ad. 2. Have a look at a QML application, and find the application viewer object. Through it's rootContext(), you get access to the environment as it is seen from QML. If you register a QObject as a context object under a name, this name will be known in QML. You get access to this QObject's declared Q_PROPERTY's, it's signals and it's slot. Almost all communication happens by connecting QML properties or signals and properties, signals or slots of the QObject.

        Mirko Boehm | mirko@kde.org | KDE e.V.
        FSFE Fellow
        Qt Certified Specialist

        1 Reply Last reply
        0
        • Q Offline
          Q Offline
          qtd1d1
          wrote on last edited by
          #4

          Thanks. Much clearer now...

          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