aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickmousearea/data/pressedCanceled.qml
blob: 14630b89627e8a6b7f78e2d66385a3adbc26d15d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import QtQuick 2.0
import QtQuick.Window 2.0

Rectangle {
    id: root
    color: "#ffffff"
    width: 320; height: 240
    property bool pressed:mouse.pressed
    property bool canceled: false
    property bool released: false
    property alias secondWindow: secondWindow

    Window {
        id: secondWindow
        x: root.x + root.width
    }

    MouseArea {
        id: mouse
        anchors.fill: parent
        onPressed: { root.canceled = false }
        onCanceled: {root.canceled = true}
        onReleased: {root.released = true; root.canceled = false}
    }
}