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. Repopulating list items in a Qml Qtquick controls 2 Combobox

Repopulating list items in a Qml Qtquick controls 2 Combobox

Scheduled Pinned Locked Moved Solved QML and Qt Quick
2 Posts 1 Posters 709 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.
  • B Offline
    B Offline
    BillRussell
    wrote on last edited by
    #1

    How can I re-populate the items in a combobox in Qt 5.8 Qtquick controls 2. Below is a typical way of populating and show up no problem. But what if I want to remove, add, reorder, etc.

    ComboBox {
    model: ["First", "Second", "Third"]
    }

    I am actually using a C++ model class to populate it based on this link text but I would be willing to do it from either qml or c++ side.

    B 1 Reply Last reply
    0
    • B BillRussell

      How can I re-populate the items in a combobox in Qt 5.8 Qtquick controls 2. Below is a typical way of populating and show up no problem. But what if I want to remove, add, reorder, etc.

      ComboBox {
      model: ["First", "Second", "Third"]
      }

      I am actually using a C++ model class to populate it based on this link text but I would be willing to do it from either qml or c++ side.

      B Offline
      B Offline
      BillRussell
      wrote on last edited by
      #2

      @BillRussell Never mind. By calling the C++ model methods, I was able to do it. For some reason yesterday things didn't seem to be working for me.

      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