import QtQuick 2.13 import QtQuick.Controls 2.13 import QtQuick.Templates 2.13 as T ApplicationWindow { visible: true width: 640 height: 480 Rectangle { id: rectangle x: 100 y: 100 width: 200 height: 200 color: dragHandler.active ? "red" : "orange" opacity: 0.8 T.Popup { id: popup closePolicy: Popup.NoAutoClose implicitWidth: contentItem.implicitWidth implicitHeight: contentItem.implicitHeight Component.onCompleted: open() contentItem: Rectangle { implicitWidth: 50 implicitHeight: 50 color: "blue" MouseArea { anchors.fill: parent preventStealing: true onPositionChanged: console.log(mouseY) } } } DragHandler { id: dragHandler } } }