summaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickmousearea/data/nestedSendEvent.qml
blob: 908a43b04ec3af1010eeacbbed8c3f6e0496658f (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import QtQuick 2.11
import QtQuick.Window 2.11
import Test 1.0

Window {
    id: window
    visible: true
    width: 200
    height: 200

    property EventSender sender: EventSender { }

    Item {
        width: 200
        height: 200

        MouseArea {
            anchors.fill: parent
        }

        Item {
            width: 200
            height: 200

            Rectangle {
                width: 200
                height: 100
                color: "red"

                MouseArea {
                    anchors.fill: parent
                    onPressed: sender.sendMouseClick(window, 50, 50)
                }
            }

            Rectangle {
                y: 100
                width: 200
                height: 100
                color: "yellow"

                MouseArea {
                    anchors.fill: parent
                    onPressed: sender.sendMouseClick(window, 50, 50)
                }
            }
        }
    }
}