diff options
author | Andrew den Exter <andrew.den.exter@jollamobile.com> | 2013-02-15 21:29:32 +1000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-22 02:10:21 +0100 |
commit | 7a1282a9edd8afa4645d7d449ca2ed3746fb8d71 (patch) | |
tree | 5c6c9f1dd46bfbd55ad8c508581ae631e3ecce22 /tests/auto/quick/qquickmousearea/data | |
parent | b939bc6300d79862340ff35dc8910663bda5744f (diff) |
MouseArea shouldn't grab the mouse until there is an effective drag.
A MouseArea shouldn't prevent a parent MouseArea or Flickable from
handling a drag event unless it is going to do something useful with
it.
Task-number: 29717
Change-Id: I24016994f6cf9116382ef7faeb50b10e5716e10e
Reviewed-by: Alan Alpert <aalpert@rim.com>
Diffstat (limited to 'tests/auto/quick/qquickmousearea/data')
-rw-r--r-- | tests/auto/quick/qquickmousearea/data/nestedStopAtBounds.qml | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickmousearea/data/nestedStopAtBounds.qml b/tests/auto/quick/qquickmousearea/data/nestedStopAtBounds.qml new file mode 100644 index 0000000000..1fd39bb321 --- /dev/null +++ b/tests/auto/quick/qquickmousearea/data/nestedStopAtBounds.qml @@ -0,0 +1,44 @@ +import QtQuick 2.0 + +Rectangle { + width: 400 + height: 400 + + MouseArea { + id: outer + objectName: "outer" + x: 50 + y: 50 + width: 300 + height: 300 + + drag.target: outer + drag.filterChildren: true + + Rectangle { + anchors.fill: parent + color: "yellow" + } + + MouseArea { + id: inner + objectName: "inner" + + x: 0 + y: 0 + width: 200 + height: 200 + + drag.target: inner + drag.minimumX: 0 + drag.maximumX: 100 + drag.minimumY: 0 + drag.maximumY: 100 + + Rectangle { + anchors.fill: parent + color: "blue" + } + } + } +} |