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

Changing an Animation duration has no effect

    XMLWordPrintable

Details

    • 0e69268b4 (dev), b2c09fd75 (6.6), 3f862f736 (6.5)

    Description

      Changing the duration of an Animation included in a SequentialAnimation correctly sets the targeted property, but the real duration of the Animation is not affected.

      main.qml
      import QtQuick 2.6
      import QtQuick.Window 2.2
      
      Window {
          visible: true
          width: 640
          height: 480
      
          SequentialAnimation {
              id: mainAnim
              running: true
              ScriptAction {
                  script: {
                      targetAnim.duration = 10000
                  }
              }
      
              PropertyAnimation {
                  id: targetAnim
                  target: aRectangle
                  property: "width"
                  from: 100
                  to: 1000
                  duration: 1000
                  onDurationChanged: console.log(duration)
              }
          }
      
          Rectangle {
              id: aRectangle
              width: 100
              height: 100
              color: "yellow"
          }
      }
      

      In this example, the animation takes 1 second instead of 10.

      Attachments

        Issue Links

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

          Activity

            People

              inho Inho Lee
              sr__ sr__
              Votes:
              3 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes