aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/pointerhandlers/mousearea_interop/data/dragTakeOverFromSibling.qml
blob: 1bde433dba02cfc60aefd8113ae36985c2ab429e (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
// Copyright (C) 2019 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

import QtQuick 2.12

Item {
    width: 640
    height: 480

    Rectangle {
        width: 200
        height: 200
        color: mouseArea.pressed ? "red" : "blue"
        opacity: 0.6

        MouseArea {
            id: mouseArea
            anchors.fill: parent
        }
    }
    Rectangle {
        y: 100
        z: -1
        width: 200
        height: 200
        color: dragHandler.active ? "orange" : "green"
        opacity: 0.6

        DragHandler {
            id: dragHandler
        }
    }
}