Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Do QPropertyAnimations delete themselves once they are finished?

Do QPropertyAnimations delete themselves once they are finished?

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 500 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Pippin
    wrote on last edited by
    #1

    Hi,

    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 anim once it has reached its end value?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      For automatic deletion of the animation, you can set the animation deletion policy to DeleteWhenStopped.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved