diff options
author | David Boddie <david.boddie@nokia.com> | 2011-01-17 19:16:50 (GMT) |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2011-01-17 19:16:50 (GMT) |
commit | 006929de7f84430278e370eaa468a93fa3a1fb96 (patch) | |
tree | e6fdfc64e6efc162585f8f6c01492b4925c46527 /src/declarative/util/qdeclarativestate.cpp | |
parent | 72900c3004825514244ebd38f38c0443b9774ad3 (diff) | |
download | Qt-006929de7f84430278e370eaa468a93fa3a1fb96.zip Qt-006929de7f84430278e370eaa468a93fa3a1fb96.tar.gz Qt-006929de7f84430278e370eaa468a93fa3a1fb96.tar.bz2 |
Doc: Fixed invalid/incomplete QML code snippets.
Diffstat (limited to 'src/declarative/util/qdeclarativestate.cpp')
-rw-r--r-- | src/declarative/util/qdeclarativestate.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/declarative/util/qdeclarativestate.cpp b/src/declarative/util/qdeclarativestate.cpp index bb1a0b8..c41d39a 100644 --- a/src/declarative/util/qdeclarativestate.cpp +++ b/src/declarative/util/qdeclarativestate.cpp @@ -216,15 +216,18 @@ bool QDeclarativeState::isWhenKnown() const \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 - \c state1 will always be selected rather than \c state2 when sharedCondition becomes - \c true. + 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 \c state1 will always be selected rather than + \c state2 when sharedCondition becomes \c true. \qml - states: [ - State { name: "state1"; when: sharedCondition }, - State { name: "state2"; when: sharedCondition } - ] + Item { + states: [ + State { name: "state1"; when: sharedCondition }, + State { name: "state2"; when: sharedCondition } + ] + // ... + } \endqml */ QDeclarativeBinding *QDeclarativeState::when() const |