Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qml Qt Signal and slots

Qml Qt Signal and slots

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 929 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.
  • M Offline
    M Offline
    maheshbabu
    wrote on last edited by
    #1

    Hi,

    I want to populate the Qml combobx data in Cpp file . So anyone please tell me how to do ?

    Thanks

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andreyc
      wrote on last edited by
      #2

      Have you looked "this doc":http://qt-project.org/doc/qt-5/qtqml-cppintegration-topic.html

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

        Thanks ,
        can you please give an example code like how can i add elemets to the ComboBox of Qml from C++ . So that i can ...

        1 Reply Last reply
        0
        • X Offline
          X Offline
          Xander84
          wrote on last edited by
          #4

          Hi, you could use a c++ model, e.g. "QAbstractListModel":http://qt-project.org/doc/qt-5/qabstractlistmodel.html and use that as a model for you ComboBox in QML if you really need to access the model form C++.

          If you can you should prefer to define the model in QML, that is much easier in my opinion :)

          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