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

AnimatedSprite: animation resets to the first frame unexpectedly - missing current state

    XMLWordPrintable

    Details

      Description

      What is the problem and how to reproduce it:
      Use an AnimatedSprite item and set loops to 1 (no repeat animation)
      Run project
      Wait for animation to be finished
      Try to resize window!
      What you will see: Animation jumps to start frame
      What I expected: Animation remains at current state (completed state which is in the last frame)
      Work around: Use following line in the AnimatedSprite

      Work Around
      AnimatedSprite {
              id: introAnim
              width: 200; height: 200
              anchors.centerIn: parent
              source: "qrc:/medias/images/logo_animation.jpg"
              frameHeight: 512; frameWidth: 512
              frameRate: 30
              interpolate: false
              frameCount: 99
              loops: 1
              frameSync: false
              onRunningChanged: if(!running) {introAnim.advance(-1); pause();} // <-- The work around trick to keep animation at almost last frame
          }
      

      Another use case which makes same problem:
      Use an AnimatedSprite and set loops to 1. Also animate its position using NumberAnimation just after AnimatedSprite finished (not animator).
      Run project
      Wait for animation to be finished and animation to be started!
      What you will see: Animation jumps to start frame

        Attachments

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

          Activity

            People

            Assignee:
            mbrasser Michael Brasser
            Reporter:
            seyed_m S.M.Mousavi
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes