Issue with Animations
-
Hi,
- I don't understand the Behavior animation:
@Behavior on width {
NumberAnimation { duration: 1000 }
}@Why this will be done so and not only the NumberAnimation:
@NumberAnimation on width{ duration: 1000 }@ ?
@ states: State {
name: "rotated"
PropertyChanges { target: rect; rotation: 180 }
}transitions: Transition { RotationAnimation { duration: 1000; direction: RotationAnimation.Counterclockwise } }@
Why here transitions is the animation to the PropertyChanges?
"Qt Doc":http://qt-project.org/doc/qt-4.8/qml-rotationanimation.html -
Probably you didn't explain yourself completely, because the questions seems a bit silly.
- It's just syntax!
- because transitions animates the changes when passing from a state to another, and in the "rotated" state there is a PropertyChanges statements. That's it, again, it's just syntax.
So, what do you really want to know ?
-
I request you to read the Qt Assistant for Animation. There are different ways in which animations can be triggered. Behavior and NumberAnimation are different types. They need to triggered separately. Behavior animation will trigger automatically whenever parameter(width) changes. Please read more about animations from Assistant. This will help you lot.