Wrong order in combobox
-
Hey guys,
I have a c++ model (subclass of QAbstractListModel).
When I use it with a combobox the ordering is completely wrong.
Example:
My model has 5 Items: 1, 2, 3, 4, 5
When I assign it to a listview it is ordered as expected, when I assign it to a combobox, it looks like this:
item 1
item 5
item 2
item 4
item 3Any idea, what could be wrong here?
CU
mts -
Hi,
Can you share the code you use to initialize the combo box ?
-
-
What about the model ?
-
@jpnurmi
No, the model comes from c++ and is already created before "engine.load(...)"@SGaist
The model is based on Thomas Boutroues QQmlObjectListModel (link git-repository)
The model is represented by this object:
QQmlObjectListModel<NPreset>* presetListModelThe NPreset Class has around 10 Q_PROPERTYs, one is Q_PROPERTY(QString name ...)