Important: Please read the Qt Code of Conduct -

Animation framework

  • Hi
    If I have a group of animations and have added them to a group –
    QPropertyAnimation *Animation1 = new QPropertyAnimation(widget1, "pos");
    QPropertyAnimation *Animation2 = new QPropertyAnimation(widget2, "pos");

    QParallelAnimationGroup *animationGroup = new QParallelAnimationGroup;
    animationGroup ->addAnimation(Animation1);
    animationGroup ->addAnimation(Animation2);


    Does this result in a memory leak or will the individual animations be deleted when the animation group completes ?


  • Lifetime Qt Champion


    There's no leak, the "QAnimationGroup": takes ownership of the QPropertyAnimation you add to it.

Log in to reply