Good day
I have a QML ListView with each element fits the full screen, i want to rotate those elements to show the next one every 5 seconds. how to do that?
Thanks!
Good day
I have a QML ListView with each element fits the full screen, i want to rotate those elements to show the next one every 5 seconds. how to do that?
Thanks!
You can use a QML Timer element to change the element using its onTriggered method.
As such:
Br,Code:Timer { interval: 5000 //Milliseconds running: true repeat: true onTriggered: { //Assuming your ListView id is view //and that your ListModel id is listmodel var idx = view.currentIndex idx = (idx + 1) % (listmodel.count) view.currentIndex = idx } }
Villep