Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.8.3, 5.0.0 Beta 1
-
None
-
All platforms, any environment. The bug is in cross platform code.
-
f3597af5adcd2275503e9e4bfb425549f9ab3ced (qtbase)
Description
If you set the duration of any variant or property animation to 0, its progress will be stuck at 1 (0..1), and its "end" value set on the target object, after start() has been called. If you change the direction of the animation to QAbstractAnimation::Backward, you would expect the progress to be 0 after start. Instead it's still 1; the code seems to assume that if the duration is 0, the progress must be 1 always.
We use zero-duration animations for several things - for instance, assigning to a boolean property as part of a more complex animation. We also use zero for all animations in our GUI when we do automated testing. This works for all but animations that have the direction set to QAbstractAnimation::Backward.
The workaround is to set the duration to higher than 0, but in our testing case, this means we have to wait() between all tests.
Fix coming up...