Priority: P3: Somewhat important
Affects Version/s: 4.8.3, 5.0.0 Beta 1
Fix Version/s: 5.0.0 RC 1
Component/s: Core: Animation Framework
Environment:All platforms, any environment. The bug is in cross platform code.
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...
|For Gerrit Dashboard: QTBUG-27969|
|39453,1||Fix zero-duration animations running Backwards.||master||qt/qtbase||Status: MERGED||+2||0|
|39498,1||Fix zero-duration animations running Backwards.||4.8||qt/qt||Status: MERGED||+2||0|
|39825,1||Fix zero-duration animations running Backwards.||winrt||qt/qtbase||Status: ABANDONED||0||0|