Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-27969

QVariantAnimation with 0 duration doesn't work when direction is QAbstractAnimation::Backward

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • 5.0.0 RC 1
    • 4.8.3, 5.0.0 Beta 1
    • None
    • All platforms, any environment. The bug is in cross platform code.
    • f3597af5adcd2275503e9e4bfb425549f9ab3ced (qtbase)

      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
        # Subject Branch Project Status CR V

            treinio Topi Reiniƶ
            bibr Andreas Aardal Hanssen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes