Use model classes and views instead of such approach. It will save you a lot of tears in the long run.
For a starter, see: https://doc.qt.io/qt-5/qtquick-modelviewsdata-modelview.html
Hmm good catch!
Although it turns out that I can't flick the list, because the items require some custom mouse move handling ... which reduces it to a non-interactive PathView. So, solved I guess! Thanks for pointing out the Tumbler though, and I hope my examples prove to be useful to others.
@JoeCFD yeah, that's what I had in mind (I think). What QML class did you use for your animated widget? (EDIT: I imagine it's AnimatedImage.) And, does yours have a minimum play time before it can be interrupted?
Set explicitly all names of properties because this is what you want. In some cases you might want not to animate prop1.
And this is default reaction of the engine: make change without transition (this is about performance).
@Tinnin said in SmoothedAnimation not looping:
SmoothedAnimation
You have from and to but nothing to make x Go back to zero Make a SequentialAnimation and have your steps in there. .
from: 0
to: -(groundImage.spriteWidth)
then
from: -(groundImage.spriteWidth)
to: 0
put your loop on your SequentialAnimation and not on your SmoothedAnimation same with running and the id that I am guessing this is how you trigger,
The rendering part of the QTableView is optimized for that kind of data. After a quick look at your code, it seems you are generating lots of widgets to show your data, here you would only have one.
The Sprite type has a property named to. In the to you can set randomized next sprite step.
For example:
Sprite{
name: "still"
source: "content/BearSheet.png"
frameCount: 1
frameWidth: 256
frameHeight: 256
frameDuration: 100
to: {"still":0.9, "blink":0.1, "floating":0}
}
In this Sprite after finish in 1/10 times Sprite named blink will be rendered and in 9/10 times this Sprite will be repeated. For more details aboud sequence you can read the example that I posted in past.