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. I am confused about the communication between Qt and QML

I am confused about the communication between Qt and QML

Scheduled Pinned Locked Moved QML and Qt Quick
5 Posts 4 Posters 2.9k 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.
  • X Offline
    X Offline
    xhsoldier
    wrote on last edited by
    #1

    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
    0
    • EddyE Offline
      EddyE Offline
      Eddy
      wrote on last edited by
      #2

      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
      0
      • D Offline
        D Offline
        diro
        wrote on last edited by
        #3

        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
        0
        • X Offline
          X Offline
          xhsoldier
          wrote on last edited by
          #4

          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
          0
          • A Offline
            A Offline
            andre
            wrote on last edited by
            #5

            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
            0

            • Login

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