summaryrefslogtreecommitdiffstats
path: root/examples/quick
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-12-25 14:43:36 +0100
committerLiang Qi <liang.qi@qt.io>2016-12-25 14:43:36 +0100
commitd8a052bc6b0349045db3d43a373b09cb16b41a48 (patch)
treeb39e3bc4dfd071154cdbae4bca53ef31b496f90b /examples/quick
parent0f911e46c5ccff88ade99366d7e15e1436360391 (diff)
parent884d06db09bc6179baa3add42ff4ef5f3cd0e523 (diff)
Merge remote-tracking branch 'origin/5.8.0' into 5.8
Diffstat (limited to 'examples/quick')
-rw-r--r--examples/quick/demos/calqlatr/calqlatr.qml5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/quick/demos/calqlatr/calqlatr.qml b/examples/quick/demos/calqlatr/calqlatr.qml
index 81f95907a6..017d819b01 100644
--- a/examples/quick/demos/calqlatr/calqlatr.qml
+++ b/examples/quick/demos/calqlatr/calqlatr.qml
@@ -128,6 +128,7 @@ Rectangle {
height: parent.height
MouseArea {
+ id: mouseInput
property real startX: 0
property real oldP: 0
property bool rewind: false
@@ -140,7 +141,7 @@ Rectangle {
height: 50
onPositionChanged: {
var reverse = startX > window.width / 2
- var mx = mapToItem(window, mouse.x).x
+ var mx = mapToItem(window, mouseInput.mouseX, mouseInput.mouseY).x
var p = Math.abs((mx - startX) / (window.width - display.width))
if (p < oldP)
rewind = reverse ? false : true
@@ -149,7 +150,7 @@ Rectangle {
controller.progress = reverse ? 1 - p : p
oldP = p
}
- onPressed: startX = mapToItem(window, mouse.x).x
+ onPressed: startX = mapToItem(window, mouseInput.mouseX, mouseInput.mouseY).x
onReleased: {
if (rewind)
controller.completeToBeginning()