After a long time I reported a bug to Qt as I found quite unexpected bug from Qt Quick. On Qt Quick Controls 2, if you set model statically in Tumbler component(e.g. model: [2, 4, 6, 7, 10]), everything is shown properly but currentIndex doesn't change at all. For example, even though the screen shows the fifth item, currentIndex is still 0, and onCurrentIndexChanged event doesn't fire at all.
To work around this bug, you may just set a model "dynamically" like as follows:
Components.onCompleted: {
// do something
model=[ 1, 2, 3, 4, 5 ]
// do something more
}
My check indicates this bug existed since Qt 5.12 or earlier, but nobody seems to have reported this, though I think there must be people using Tumbler like I do...... Well, maybe everyone was too lazy to write a report.
Anyway I reported the bug, and got ticket number QTBUG-85933.
https://bugreports.qt.io/browse/QTBUG-85933
I hope that the bug can be fixed sooner.