View Single Post
Posts: 415 | Thanked: 732 times | Joined on Jan 2009 @ Finland
#5
If I understood that function correctly you are moving some item 20 pixels down 5 times a second. Or do you use it to move different items?

Anyway it looks like you are creating a new QPropertyAnimation object 5 times a second. You could create the object elsewhere (e.g. as a class member) and use it's pointer in the function.

On a side note, the animation duration is longer than the interval of the function calls.

Hard to give any other comments without more details about the purpose of the function and you application.
 

The Following User Says Thank You to timoph For This Useful Post: