diff options
author | Ian Walters <ian.walters@nokia.com> | 2009-05-05 02:11:36 (GMT) |
---|---|---|
committer | Ian Walters <ian.walters@nokia.com> | 2009-05-05 02:11:36 (GMT) |
commit | d0b37af9b27849278fd56a83635c141525a912ce (patch) | |
tree | 2c0c2c149d686b52c339a5b2135fde35659d7648 /examples/declarative/slideswitch | |
parent | 28b3eb37f7647450ccbac1365a06ffc6ba6a8584 (diff) | |
parent | 84b619c1e8556c3e7ca79d799dfa705b63523370 (diff) | |
download | Qt-d0b37af9b27849278fd56a83635c141525a912ce.zip Qt-d0b37af9b27849278fd56a83635c141525a912ce.tar.gz Qt-d0b37af9b27849278fd56a83635c141525a912ce.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Conflicts:
doc/src/tutorials/declarative.qdoc
Diffstat (limited to 'examples/declarative/slideswitch')
-rw-r--r-- | examples/declarative/slideswitch/Switch.qml | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/examples/declarative/slideswitch/Switch.qml b/examples/declarative/slideswitch/Switch.qml index a3f75e8..6777277 100644 --- a/examples/declarative/slideswitch/Switch.qml +++ b/examples/declarative/slideswitch/Switch.qml @@ -2,9 +2,9 @@ Item { id: Switch width: Groove.width height: Groove.height - properties: Property { - name: "on" - } + + property var on + Script { function toggle() { @@ -14,7 +14,6 @@ Item { Switch.state = "On"; } function dorelease() { - print(Knob.x); if(Knob.x == 1) { if(Switch.state == "Off") return; @@ -46,7 +45,7 @@ Item { MouseRegion { anchors.fill: Knob onClicked: { toggle() } - onReleased: { if (!isClick) dorelease() } + onReleased: { dorelease() } drag.target: Knob drag.axis: "x" drag.xmin: 1 |