Solved ComboBox model order
-
Hi, I have a simple combo box with a list of strings as model. But I see that the model order gets automatically sorted alphabetically in the app, which flips around all the indeces. Using a ListModel results in the same.
How to keep the order and indeces just as in the model list?ComboBox{ id: combo model: ["Kick", "Tom", "Snare", "Hihat"] onCurrentIndexChanged: sounds[drum] = combo.currentIndex }
In the app the drop down menu shows: Kick | Hihat | Snare | Tom. So the text doesn't match the index as intended anymore.
Thanks!
-
Ok, using the latest Qt Quick controls version seems to have solved it.
import QtQuick.Controls 2.15