summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-08-02 06:46:16 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-08-02 06:46:16 (GMT)
commitcf5d8a23241c31d8a49c78ffb1e3f6ae288eb585 (patch)
tree047074617b22314418786e87bb7adbe6c371bed1 /src/declarative
parenta07bae9717168c9605662e117132e16b5f2b2f9d (diff)
parent3daee8e915f9845fb104e57c7f35fdb2f7251df5 (diff)
downloadQt-cf5d8a23241c31d8a49c78ffb1e3f6ae288eb585.zip
Qt-cf5d8a23241c31d8a49c78ffb1e3f6ae288eb585.tar.gz
Qt-cf5d8a23241c31d8a49c78ffb1e3f6ae288eb585.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'src/declarative')
-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