You’re right. My bad, usually I make a small example to test it, and you guessed it, this time I didn’t…
I made a small test and the onRunningChanged does work on on the Transition though.
The example below shows the log at the beginning and end of the transition.
import QtQuick 2.0
Rectangle {
id : root
width : 300
height : 300
MouseArea {
anchors.fill: parent
onClicked: icon.state = "rotated"
}
Rectangle {
id: icon
color: "red"
width: 50
height: 50
anchors.centerIn: parent
states : [
State {
name: "rotated"
PropertyChanges {
target: icon
rotation: 360
}
}
]
transitions: Transition {
RotationAnimation {
properties: "rotation"
duration: 2000
}
onRunningChanged: console.log("rotation running: " + running)
}
}
}
↧