Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.10
-
None
Description
Given the following code (untested, for illustration):
Item { id: root property int x: 0 NumberAnimation { id: anim target: root property: "x" from: x to: x + 10 duration: 1000 loops: Animation.Infinite } }
Now, anim.from is initialized to 0 and anim.to to 10 in every iteration of the loop. This means that x will go from 0 to 10, and then restart from 0 to 10, ad infinitum. This behaviour won't change in qml, but it should be documented (in http://doc.qt.io/qt-5/qml-qtquick-numberanimation.html).
The workaround is to replace
loops: Animation.Infinite
with
onStopped: start()
Attachments
Issue Links
- relates to
-
QTBUG-17552 Changes to Animation's 'to' and 'from' properties ignored while animating
-
- Closed
-