From 03de177e4f4d028ac75c2100060ab5d7389d3a2c Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Wed, 25 Nov 2009 15:00:05 +1000 Subject: slideswitch example fixes --- doc/src/declarative/example-slideswitch.qdoc | 3 +++ examples/declarative/slideswitch/slideswitch.qml | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/src/declarative/example-slideswitch.qdoc b/doc/src/declarative/example-slideswitch.qdoc index a8376eb..492a8ea 100644 --- a/doc/src/declarative/example-slideswitch.qdoc +++ b/doc/src/declarative/example-slideswitch.qdoc @@ -131,4 +131,7 @@ In order for the the knob to move smoothly we add a transition that will animate For more information on transitions see \l{state-transitions}{QML Transitions}. +\section1 Usage +The switch can be used in a QML file, like this: +\snippet examples/declarative/slideswitch/slideswitch.qml 0 */ diff --git a/examples/declarative/slideswitch/slideswitch.qml b/examples/declarative/slideswitch/slideswitch.qml index 9b46cd1..396749f 100644 --- a/examples/declarative/slideswitch/slideswitch.qml +++ b/examples/declarative/slideswitch/slideswitch.qml @@ -5,7 +5,7 @@ Rectangle { color: "white" width: 400; height: 250 - Switch { - anchors.centerIn: parent - } +//![0] + Switch { anchors.centerIn: parent; on: false } +//![0] } -- cgit v0.12