Repopulating list items in a Qml Qtquick controls 2 Combobox

  • 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.

  • @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.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.