Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qml Qt Signal and slots
Qt 6.12 LTS is out! See what's new in the release blog

Qml Qt Signal and slots

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 1.1k 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.
  • ? Offline
    ? Offline
    A Former User
    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
      • ? Offline
        ? Offline
        A Former User
        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
        • ? Offline
          ? Offline
          A Former User
          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
          • Unsolved