import QtQuick 2.12 import QtQuick.Window 2.12 Window { visible: true width: 640 height: 480 title: qsTr("Hello World") Rectangle { id: rect x:200 y:200 width: 300 height: 300 color: "teal" Rectangle { //z: -1 x: -10 y: -30 width: 100 height: 100 color: "salmon" DragHandler { target: rect } } } }