summaryrefslogtreecommitdiffstats
path: root/examples/declarative/slideswitch
diff options
context:
space:
mode:
authorIan Walters <ian.walters@nokia.com>2009-05-05 02:11:36 (GMT)
committerIan Walters <ian.walters@nokia.com>2009-05-05 02:11:36 (GMT)
commitd0b37af9b27849278fd56a83635c141525a912ce (patch)
tree2c0c2c149d686b52c339a5b2135fde35659d7648 /examples/declarative/slideswitch
parent28b3eb37f7647450ccbac1365a06ffc6ba6a8584 (diff)
parent84b619c1e8556c3e7ca79d799dfa705b63523370 (diff)
downloadQt-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.qml9
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