aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/doc/snippets/pointerHandlers/dragHandlerMargin.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/doc/snippets/pointerHandlers/dragHandlerMargin.qml')
-rw-r--r--src/quick/doc/snippets/pointerHandlers/dragHandlerMargin.qml27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/quick/doc/snippets/pointerHandlers/dragHandlerMargin.qml b/src/quick/doc/snippets/pointerHandlers/dragHandlerMargin.qml
new file mode 100644
index 0000000000..7844d118e4
--- /dev/null
+++ b/src/quick/doc/snippets/pointerHandlers/dragHandlerMargin.qml
@@ -0,0 +1,27 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+import QtQuick
+
+//! [entire]
+Item {
+ width: 320
+ height: 240
+ //![draggable]
+ Rectangle {
+ width: 24
+ height: 24
+ border.color: "steelblue"
+ Text {
+ text: "it's\ntiny"
+ font.pixelSize: 7
+ rotation: -45
+ anchors.centerIn: parent
+ }
+
+ DragHandler {
+ margin: 12
+ }
+ }
+ //![draggable]
+}
+//! [entire]