diff options
Diffstat (limited to 'tests/qmlcamera')
-rw-r--r-- | tests/qmlcamera/qml/qmlcamera/main.qml | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/qmlcamera/qml/qmlcamera/main.qml b/tests/qmlcamera/qml/qmlcamera/main.qml index 1f87d5eb..705f284d 100644 --- a/tests/qmlcamera/qml/qmlcamera/main.qml +++ b/tests/qmlcamera/qml/qmlcamera/main.qml @@ -71,6 +71,30 @@ Item { scene.activeCamera.zoomLevel: zoomSlider.value inputHandler: null } + + MouseArea { + id: inputArea + anchors.fill: parent + acceptedButtons: Qt.LeftButton | Qt.RightButton + property bool selectionOn: false + + onPressed: { + if (mouse.button == Qt.LeftButton) + selectionOn = true; + testChart.scene.selectionQueryPosition = Qt.point(mouse.x, mouse.y); + } + + onReleased: { + if (mouse.button == Qt.LeftButton) + selectionOn = false; + } + + onPositionChanged: { + if (selectionOn) { + testChart.scene.selectionQueryPosition = Qt.point(mouse.x, mouse.y); + } + } + } } ControlSurface { |