How best to create a repeating animation?
Solved
General and Desktop
-
Lets say I want to animate a graphics item that draws a circle. I want to animate it's radius.
However, I want to cycle from a radius of 0 to 10 three times. How best to do it?I assume I would use something like QPropertyAnimation on a class like the one below:
class Circle: public QGraphicsItem { Q_PROPERTY(int radius READ radius WRITE setRadius) ... }
Of course going from radius 0 to R, is easy, but what would be a natural animation-framework way of going from 0->R three of more times?
Should I just create another timer that resets the radius, and just restarts the animation? Or is there a more natural way? -
Hi,
Isn't the QAbstractAnimation::loopCount property what you are looking for ?