Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    I am confused about the communication between Qt and QML

    QML and Qt Quick
    4
    5
    2640
    Loading More Posts
    • 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.
    • X
      xhsoldier last edited by

      several questions:

      1. In QML how to call function in Qt C++?

      2. In QML how to connect signal to Qt C++ slots?

      3. In Qt C++ how to manage the QML element? For example, change the property of the item, create the item dynamically?

      4. In Qt C++ how to connect signal to QML slots?

      5. In Qt C++ how to call functions in QML?

      Sorry, I am new to QML, but these topic is very important for implementing the application. In General, the question is the communication methods between Qt C++ and QML.

      1 Reply Last reply Reply Quote 0
      • E
        Eddy last edited by

        Have you found "this wiki":http://developer.qt.nokia.com/wiki/Category:Developing_with_Qt::Qt_Quick?

        Especially the datasharing topic should interest you there.

        Qt Certified Specialist
        www.edalsolutions.be

        1 Reply Last reply Reply Quote 0
        • D
          diro last edited by

          For QML to call C++ function is in the tutorial.
          http://doc.qt.nokia.com/latest/qml-extending-tutorial-index.html

          For C++ to manage QML, it would be a bit complex, the main concept is MetaObject
          Call function:
          http://www.lothlorien.com/kf6gpe/?p=309

          Property:
          http://stackoverflow.com/questions/5709820/communication-between-c-and-qml

          1 Reply Last reply Reply Quote 0
          • X
            xhsoldier last edited by

            I am now quite clearly. In all, there are three basic methods:

            1. through signal/slot
            2. Invokable method
            3. property change
            1 Reply Last reply Reply Quote 0
            • A
              andre last edited by

              All these are very closely related:

              Slots are invokable methods (though not the other way around), and property changes must have a notification signal in order to work. Often, the setter methods of a property are even defined as slots.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post