summaryrefslogtreecommitdiffstats
path: root/doc/src/declarative/example-slideswitch.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/declarative/example-slideswitch.qdoc')
-rw-r--r--doc/src/declarative/example-slideswitch.qdoc12
1 files changed, 10 insertions, 2 deletions
diff --git a/doc/src/declarative/example-slideswitch.qdoc b/doc/src/declarative/example-slideswitch.qdoc
index 2b82b2f..9f84ee6 100644
--- a/doc/src/declarative/example-slideswitch.qdoc
+++ b/doc/src/declarative/example-slideswitch.qdoc
@@ -60,8 +60,16 @@ It can be used to activate/disactivate the switch or to query its current state.
In this example:
\qml
-Switch { id: mySwitch; on: true }
-Text { text: "The switch is on"; visible: mySwitch.on == true }
+Item {
+ Switch {
+ id: mySwitch
+ on: true
+ }
+ Text {
+ text: "The switch is on"
+ visible: mySwitch.on == true
+ }
+}
\endqml
the text will only be visible when the switch is on.