Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Do QPropertyAnimations delete themselves once they are finished?
Pippin last edited by
If I create a QPropertyAnimation pointer and use it, is it automatically deleted when it's finished? If not, does Qt take care of it so that I don't have to worry about it?
QPropertyAnimation *anim = new QPropertyAnimation(object, "property_name"); anim->setDuration(5000); anim->setEndValue(1.); anim->start();
What happens to
animonce it has reached its end value?
For automatic deletion of the animation, you can set the animation deletion policy to DeleteWhenStopped.