summaryrefslogtreecommitdiffstats
path: root/examples/declarative/mouseregion
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-08-19 01:50:35 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-08-19 01:50:35 (GMT)
commitb3c992c9b53d8f1630bdbc7472a29910f11ee035 (patch)
tree7074cf1a94ee556809c2b9db8a604be3fa8e4f9e /examples/declarative/mouseregion
parent1a226c81b7461b793fb94df5817701caef9c2014 (diff)
downloadQt-b3c992c9b53d8f1630bdbc7472a29910f11ee035.zip
Qt-b3c992c9b53d8f1630bdbc7472a29910f11ee035.tar.gz
Qt-b3c992c9b53d8f1630bdbc7472a29910f11ee035.tar.bz2
API improvements for MouseRegion and Drag
Diffstat (limited to 'examples/declarative/mouseregion')
-rw-r--r--examples/declarative/mouseregion/mouse.qml3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/declarative/mouseregion/mouse.qml b/examples/declarative/mouseregion/mouse.qml
index 34c6e66..0cb8bb9 100644
--- a/examples/declarative/mouseregion/mouse.qml
+++ b/examples/declarative/mouseregion/mouse.qml
@@ -8,6 +8,7 @@ Rect {
color: "red"
Text { text: "Click"; anchors.centerIn: parent }
MouseRegion {
+ hoverEnabled: true
onPressed: { print('press (x: ' + mouse.x + ' y: ' + mouse.y + ' button: ' + (mouse.button == Qt.RightButton ? 'right' : 'left') + ' Shift: ' + (mouse.modifiers & Qt.ShiftModifier ? 'true' : 'false') + ')') }
onReleased: { print('release (x: ' + mouse.x + ' y: ' + mouse.y + ' isClick: ' + mouse.isClick + ' wasHeld: ' + mouse.wasHeld + ')') }
onClicked: { print('click (x: ' + mouse.x + ' y: ' + mouse.y + ' wasHeld: ' + mouse.wasHeld + ')') }
@@ -24,7 +25,7 @@ Rect {
Text { text: "Drag"; anchors.centerIn: parent }
MouseRegion {
drag.target: parent
- drag.axis: "x"
+ drag.axis: "XAxis"
drag.minimumX: 0
drag.maximumX: 150
onPressed: { print('press') }