Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
4.7.3, 5.0.0
-
None
Description
Run the code below.
Note that "running: true" is printed in the debug console upon start. This is unexpected as property change notifications are usually only triggered when the value changes from its initial value.
Now replace the SequentialAnimation's "running: true" code with any other expression that evaluates to true, such as "running: blueRect.width > 0" and note that the animation does not run.
import QtQuick 1.1 Item { width: 950 height: 500 Rectangle { id: blueRect color: "blue" width: 500; height: 300 Rectangle { id: redRect color: "red" width: 50 height: 50 anchors.verticalCenter: parent.verticalCenter } SequentialAnimation { id: anim running: true // works // running: blueRect.width > 0 // doesn't work! onRunningChanged: print("running: " + running) loops: Animation.Infinite NumberAnimation { target: redRect; property: "x" from: 0; to: blueRect.width-redRect.width duration: 1000 } NumberAnimation { target: redRect; property: "x" from: blueRect.width-redRect.width; to: 0 duration: 1000 } } } }
Attachments
Issue Links
- relates to
-
QTBUG-111301 SequentialAnimation is running by default: seems inconsistent
-
- Reported
-