diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2010-06-01 05:51:40 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2010-06-01 05:52:14 (GMT) |
commit | 0400d1474e65a5fd849c1610bdf0717af295f704 (patch) | |
tree | 3f2eab54a7c85ae88b0e97cab0fb368465014058 /src/declarative | |
parent | 3eafb8d13a51d72af053e19fa4bc66b83f81a923 (diff) | |
download | Qt-0400d1474e65a5fd849c1610bdf0717af295f704.zip Qt-0400d1474e65a5fd849c1610bdf0717af295f704.tar.gz Qt-0400d1474e65a5fd849c1610bdf0717af295f704.tar.bz2 |
Documentation.
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/util/qdeclarativepropertychanges.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/declarative/util/qdeclarativepropertychanges.cpp b/src/declarative/util/qdeclarativepropertychanges.cpp index d99de7a..08f4750 100644 --- a/src/declarative/util/qdeclarativepropertychanges.cpp +++ b/src/declarative/util/qdeclarativepropertychanges.cpp @@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE /*! \qmlclass PropertyChanges QDeclarativePropertyChanges \since 4.7 - \brief The PropertyChanges element describes new property values for a state. + \brief The PropertyChanges element describes new property bindings or values for a state. PropertyChanges provides a state change that modifies the properties of an item. @@ -89,6 +89,21 @@ QT_BEGIN_NAMESPACE MouseArea { anchors.fill: parent; onClicked: myText.state = 'myState' } } \endqml + + By default, PropertyChanges will establish new bindings where appropriate. + For example, the following creates a new binding for myItem's height property. + + \qml + PropertyChanges { + target: myItem + height: parent.height + } + \endqml + + If you don't want a binding to be established (and instead just want to assign + the value of the binding at the time the state is entered), + you should set the PropertyChange's \l{PropertyChanges::explicit}{explicit} + property to \c true. State-specific script for signal handlers can also be specified: |