import QtQuick import QtQuick.Controls ApplicationWindow { id: window width: 1280 height: 720 color: "#000000" visible: true MouseArea { anchors.fill: parent onClicked: { if ( popup ) { popup.open(); } } } Popup { id: popup anchors.centerIn: parent width: 200 height: 200 focus: true closePolicy: Popup.NoAutoClose modal: true Overlay.modal: Rectangle { anchors.fill: parent color: "#2200ff00" } MouseArea { anchors.fill: parent onClicked: { popup.destroy(); } } } }