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

QML States do not always revert to their original values if transition animations are interrupted.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 4.7.1, 4.7.2
    • None
    • Qt 4.7.1/4.7.2 on (Linux) Desktop, MeeGo, and Simulator. Tested in Qt Creator 2.1.81, on command line with qmlviewer, and as an hybrid C++/QML app on mobile device.

    Description

      If a property is being changed via a state change from a named state back to its default value, and if the value is being changed with a NumberAnimation, the property does not always properly revert to its original value if the animation is interrupted and restarted before the original value is reached.

      In the attached code sample, the property being changed is anchors.leftMargin, but the bug's behavior holds true for any numeric property.

      If you run the code and rapidly click on the blue button (interrupting the animation), the top rectangle will eventually stop returning to it's default state properly. The bottom rectangle always will. The top rectangle uses a State to change the value, where the bottom uses a ternary operator evaluation.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              brasser Michael Brasser (closed Nokia identity) (Inactive)
              markdlong Mark Long
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes