diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-05-11 07:49:26 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-05-11 07:49:26 (GMT) |
commit | 415da7f2969bad2765fe535daf9322c7a538da81 (patch) | |
tree | 9f5c69acd4cfa532d8f5136fb60e6b9f0b55e8b3 /examples/declarative/mouseregion | |
parent | b3526f5edf6425289ef2aa5c8adfc89892817ac0 (diff) | |
download | Qt-415da7f2969bad2765fe535daf9322c7a538da81.zip Qt-415da7f2969bad2765fe535daf9322c7a538da81.tar.gz Qt-415da7f2969bad2765fe535daf9322c7a538da81.tar.bz2 |
Join some lines in examples.
Diffstat (limited to 'examples/declarative/mouseregion')
-rw-r--r-- | examples/declarative/mouseregion/mouse.qml | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/examples/declarative/mouseregion/mouse.qml b/examples/declarative/mouseregion/mouse.qml index 6d10425..471874d 100644 --- a/examples/declarative/mouseregion/mouse.qml +++ b/examples/declarative/mouseregion/mouse.qml @@ -1,15 +1,10 @@ Rect { color: "white" - width: 200 - height: 200 + width: 200; height: 200 Rect { - width: 50 - height: 50 + width: 50; height: 50 color: "red" - Text { - text: "Click" - anchors.centeredIn: parent - } + Text { text: "Click"; anchors.centeredIn: parent } MouseRegion { 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 + ')') } @@ -22,14 +17,9 @@ Rect { } } Rect { - y: 100 - width: 50 - height: 50 + y: 100; width: 50; height: 50 color: "blue" - Text { - text: "Drag" - anchors.centeredIn: parent - } + Text { text: "Drag"; anchors.centeredIn: parent } MouseRegion { drag.target: parent drag.axis: "x" |