aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quickcontrols/qquickpopup/data/parentToOverlay.qml
blob: a5767cfed4f024e3121673969b9a33b670a0fcf5 (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
// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

import QtQuick
import QtQuick.Controls

ApplicationWindow {
    width: 600
    height: 600

    property alias button: buttonInPopup
    property alias lowerMouseArea: lowerMA
    property alias upperMouseArea: upperMA

    MouseArea {
        id: lowerMA
        anchors.fill: parent
    }

    Popup {
        anchors.centerIn: Overlay.overlay
        width: 400
        height: 400
        modal: true
        dim: true

        Button {
            id: buttonInPopup
            anchors.centerIn: parent
            text: "click me"
        }
    }

    MouseArea {
        id: upperMA
        parent: Overlay.overlay
        anchors.fill: parent
        z: 1
    }
}