diff options
author | Alberto Mardegan <info@mardy.it> | 2012-07-05 18:10:34 +0400 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-16 02:30:52 +0200 |
commit | 80dd824864df17bb1293a4438325f2b20306861b (patch) | |
tree | 0dafc29e090daf32a8d769c172aa00d1326d8957 /tests/auto/quick/qquickmousearea/data | |
parent | c87df269c0590f5d0b9837d539a5c119e401b750 (diff) |
MouseArea: use current value of drag.axis
If the drag.axis is changed while a drag operation is in progress, put
it into action immediately. This allows, for example, start a dragging
operation out of an item in a scrollable ListView to anywhere on the
screen.
See the linked bug number for an example.
Task-number: QTBUG-26440
Change-Id: Id4219d44d1066dd962319086ac1f2a2a75bb2525
Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'tests/auto/quick/qquickmousearea/data')
-rw-r--r-- | tests/auto/quick/qquickmousearea/data/changeAxis.qml | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickmousearea/data/changeAxis.qml b/tests/auto/quick/qquickmousearea/data/changeAxis.qml new file mode 100644 index 0000000000..cf791df31d --- /dev/null +++ b/tests/auto/quick/qquickmousearea/data/changeAxis.qml @@ -0,0 +1,22 @@ +import QtQuick 2.0 +Rectangle { + id: whiteRect + width: 200 + height: 200 + color: "white" + Rectangle { + id: blackRect + objectName: "blackrect" + color: "black" + y: 50 + x: 50 + width: 100 + height: 100 + MouseArea { + objectName: "mouseregion" + anchors.fill: parent + drag.target: blackRect + drag.axis: blackRect.x <= 75 ? Drag.XandYAxis : Drag.YAxis + } + } + } |