equal
deleted
inserted
replaced
70 bool blockRunningChanged; |
70 bool blockRunningChanged; |
71 }; |
71 }; |
72 |
72 |
73 /*! |
73 /*! |
74 \qmlclass Behavior QDeclarativeBehavior |
74 \qmlclass Behavior QDeclarativeBehavior |
|
75 \ingroup qml-animation-transition |
75 \since 4.7 |
76 \since 4.7 |
76 \brief The Behavior element allows you to specify a default animation for a property change. |
77 \brief The Behavior element allows you to specify a default animation for a property change. |
77 |
78 |
78 A Behavior defines the default animation to be applied whenever a |
79 A Behavior defines the default animation to be applied whenever a |
79 particular property value changes. |
80 particular property value changes. |
82 whenever the \l Rectangle's \c width value changes. When the MouseArea |
83 whenever the \l Rectangle's \c width value changes. When the MouseArea |
83 is clicked, the \c width is changed, triggering the behavior's animation: |
84 is clicked, the \c width is changed, triggering the behavior's animation: |
84 |
85 |
85 \snippet doc/src/snippets/declarative/behavior.qml 0 |
86 \snippet doc/src/snippets/declarative/behavior.qml 0 |
86 |
87 |
87 To run multiple animations within a Behavior, use ParallelAnimation or |
88 Note that a property cannot have more than one assigned Behavior. To provide |
|
89 multiple animations within a Behavior, use ParallelAnimation or |
88 SequentialAnimation. |
90 SequentialAnimation. |
89 |
91 |
90 Note that a property cannot have more than one assigned Behavior. |
92 If a \l{QML States}{state change} has a \l Transition that matches the same property as a |
91 |
93 Behavior, the \l Transition animation overrides the Behavior for that |
92 \sa {Property Behaviors}, {declarative/animation/behaviors}{Behavior example}, QtDeclarative |
94 state change. |
|
95 |
|
96 \sa {QML Animation}, {declarative/animation/behaviors}{Behavior example}, QtDeclarative |
93 */ |
97 */ |
94 |
98 |
95 |
99 |
96 QDeclarativeBehavior::QDeclarativeBehavior(QObject *parent) |
100 QDeclarativeBehavior::QDeclarativeBehavior(QObject *parent) |
97 : QObject(*(new QDeclarativeBehaviorPrivate), parent) |
101 : QObject(*(new QDeclarativeBehaviorPrivate), parent) |