diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-11-23 04:27:13 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-11-23 04:27:13 (GMT) |
commit | 62b51f36c41fdef46b785d8f3a9443c016a9263a (patch) | |
tree | fb6878c5036de4d76a5a19011b9531ef5949a437 /examples/declarative/mouseregion | |
parent | 3c4df26a8d184b728395c8aad26b05626176b7b5 (diff) | |
download | Qt-62b51f36c41fdef46b785d8f3a9443c016a9263a.zip Qt-62b51f36c41fdef46b785d8f3a9443c016a9263a.tar.gz Qt-62b51f36c41fdef46b785d8f3a9443c016a9263a.tar.bz2 |
Use console.log, not print
Diffstat (limited to 'examples/declarative/mouseregion')
-rw-r--r-- | examples/declarative/mouseregion/mouse.qml | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/examples/declarative/mouseregion/mouse.qml b/examples/declarative/mouseregion/mouse.qml index 91f3b6e..d07d471 100644 --- a/examples/declarative/mouseregion/mouse.qml +++ b/examples/declarative/mouseregion/mouse.qml @@ -10,13 +10,13 @@ Rectangle { MouseRegion { hoverEnabled: true acceptedButtons: Qt.LeftButton | Qt.RightButton - 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 + ')') } - onDoubleClicked: { print('double click (x: ' + mouse.x + ' y: ' + mouse.y + ')') } - onPressAndHold: { print('press and hold') } - onEntered: { print('entered ' + pressed) } - onExited: { print('exited ' + pressed) } + onPressed: { console.log('press (x: ' + mouse.x + ' y: ' + mouse.y + ' button: ' + (mouse.button == Qt.RightButton ? 'right' : 'left') + ' Shift: ' + (mouse.modifiers & Qt.ShiftModifier ? 'true' : 'false') + ')') } + onReleased: { console.log('release (x: ' + mouse.x + ' y: ' + mouse.y + ' isClick: ' + mouse.isClick + ' wasHeld: ' + mouse.wasHeld + ')') } + onClicked: { console.log('click (x: ' + mouse.x + ' y: ' + mouse.y + ' wasHeld: ' + mouse.wasHeld + ')') } + onDoubleClicked: { console.log('double click (x: ' + mouse.x + ' y: ' + mouse.y + ')') } + onPressAndHold: { console.log('press and hold') } + onEntered: { console.log('entered ' + pressed) } + onExited: { console.log('exited ' + pressed) } anchors.fill: parent } } @@ -29,11 +29,11 @@ Rectangle { drag.axis: "XAxis" drag.minimumX: 0 drag.maximumX: 150 - onPressed: { print('press') } - onReleased: { print('release (isClick: ' + mouse.isClick + ') (wasHeld: ' + mouse.wasHeld + ')') } - onClicked: { print('click' + '(wasHeld: ' + mouse.wasHeld + ')') } - onDoubleClicked: { print('double click') } - onPressAndHold: { print('press and hold') } + onPressed: { console.log('press') } + onReleased: { console.log('release (isClick: ' + mouse.isClick + ') (wasHeld: ' + mouse.wasHeld + ')') } + onClicked: { console.log('click' + '(wasHeld: ' + mouse.wasHeld + ')') } + onDoubleClicked: { console.log('double click') } + onPressAndHold: { console.log('press and hold') } anchors.fill: parent } } |