summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-06-01 15:51:40 +1000
committerMichael Brasser <michael.brasser@nokia.com>2010-06-01 15:52:14 +1000
commit0400d1474e65a5fd849c1610bdf0717af295f704 (patch)
tree3f2eab54a7c85ae88b0e97cab0fb368465014058 /src
parent3eafb8d13a51d72af053e19fa4bc66b83f81a923 (diff)
Documentation.
Diffstat (limited to 'src')
-rw-r--r--src/declarative/util/qdeclarativepropertychanges.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/declarative/util/qdeclarativepropertychanges.cpp b/src/declarative/util/qdeclarativepropertychanges.cpp
index d99de7a408..08f47509d9 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: