summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qdeclarativestate.cpp
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-08-02 06:22:43 (GMT)
committerBea Lam <bea.lam@nokia.com>2010-08-02 06:23:13 (GMT)
commit3daee8e915f9845fb104e57c7f35fdb2f7251df5 (patch)
tree148f27269a3f3a921fb95a85b367487fae2155aa /src/declarative/util/qdeclarativestate.cpp
parent969daadd245153e8bb6c9a89a51565b83832f484 (diff)
downloadQt-3daee8e915f9845fb104e57c7f35fdb2f7251df5.zip
Qt-3daee8e915f9845fb104e57c7f35fdb2f7251df5.tar.gz
Qt-3daee8e915f9845fb104e57c7f35fdb2f7251df5.tar.bz2
State doc fixes, improvements
Task-number: QTBUG-12570
Diffstat (limited to 'src/declarative/util/qdeclarativestate.cpp')
-rw-r--r--src/declarative/util/qdeclarativestate.cpp15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/declarative/util/qdeclarativestate.cpp b/src/declarative/util/qdeclarativestate.cpp
index f7dae10..0d43d21 100644
--- a/src/declarative/util/qdeclarativestate.cpp
+++ b/src/declarative/util/qdeclarativestate.cpp
@@ -229,20 +229,7 @@ bool QDeclarativeState::isWhenKnown() const
be applied. For example, the following \l Rectangle changes in and out of the "hidden"
state when the \l MouseArea is pressed:
- \qml
- Rectangle {
- id: myRect
- width: 100; height: 100
- color: "red"
-
- MouseArea { id: mouseArea; anchors.fill: parent }
-
- states: State {
- name: "hidden"; when: mouseArea.pressed
- PropertyChanges { target: myRect; opacity: 0 }
- }
- }
- \endqml
+ \snippet doc/src/snippets/declarative/state-when.qml 0
If multiple states in a group have \c when clauses that evaluate to \c true at the same time,
the first matching state will be applied. For example, in the following snippet