aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quickwidgets/qquickwidget/data/mouse.qml
blob: 5d1c6e84436549eb4c12bc60c5fe5bef572339a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import QtQuick 2.0

Rectangle {
    width: 50
    height: 50

    property bool wasClicked: false
    property bool wasDoubleClicked: false
    property bool wasMoved: false

    MouseArea {
        anchors.fill: parent
        hoverEnabled: true
        onClicked: wasClicked = true
        onDoubleClicked: wasDoubleClicked = true
        onMouseXChanged: wasMoved = true
    }
}