Details
-
Bug
-
Resolution: Unresolved
-
P4: Low
-
None
-
5.5.0 Alpha
-
Ubuntu 13.04
Description
In attached example, if "running = false", pause() or stop() is called in Component.onComplete:
{..}, animator keeps running.
import QtQuick 2.4 import QtQuick.Window 2.2 import QtQuick.Controls 1.2 Window { visible: true width: 300 height: 100 Text { id: label text: "abc" } XAnimator { id: anim loops: Animation.Infinite running: true target: label from: 0 to: 50 duration: 1000 onStopped: console.log("animator was stopped") } MouseArea { anchors.fill: parent onClicked: { console.log(">onClicked"); if (anim.paused) anim.resume(); else anim.pause(); // anim.running = !anim.running console.log("<onClicked"); } } Component.onCompleted: { console.log(">Component.onCompleted"); anim.pause(); // anim.running = false console.log("<Component.onCompleted"); } Text { anchors.bottom: parent.bottom text: "is running: " + anim.running + ", is paused: " + anim.paused } }
Attachments
Gerrit Reviews
For Gerrit Dashboard: QTBUG-45220 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
109605,6 | Add inheritance documentation markup to animator classes. | 5.5 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
109670,3 | Improve debug formatting of QAbstractAnimationJob and related classes. | 5.5 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
109953,2 | Make sure we stop animators if they are yet to be started. | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |