qt6-bb10/qtdeclarative/tests/auto/quick/pointerhandlers/qquickdraghandler/data/dragMargin.qml

38 lines
808 B
QML

import QtQuick 2.15
Rectangle {
color: "#333"
width: 480; height: 480
Rectangle {
color: "#112"
width: 100
height: 100
x: 50; y: 50
DragHandler {
id: dragHandler
margin: 20
cursorShape: Qt.ClosedHandCursor
}
Rectangle {
id: rect
anchors.fill: parent
anchors.margins: -dragHandler.margin
color: "transparent"
border.color: "cyan"
border.width: 2
radius: 10
antialiasing: true
Text {
color: "cyan"
text: "drag this margin area"
font.pixelSize: 10
anchors.horizontalCenter: parent.horizontalCenter
}
}
}
}