aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/doc/snippets
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/doc/snippets')
-rw-r--r--src/quick/doc/snippets/pointerHandlers/wheelHandlerAcceptedModifiers.qml20
-rw-r--r--src/quick/doc/snippets/pointerHandlers/wheelHandlerMargin.qml15
2 files changed, 35 insertions, 0 deletions
diff --git a/src/quick/doc/snippets/pointerHandlers/wheelHandlerAcceptedModifiers.qml b/src/quick/doc/snippets/pointerHandlers/wheelHandlerAcceptedModifiers.qml
new file mode 100644
index 0000000000..1a8db7b636
--- /dev/null
+++ b/src/quick/doc/snippets/pointerHandlers/wheelHandlerAcceptedModifiers.qml
@@ -0,0 +1,20 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+//![entire]
+import QtQuick
+
+Rectangle {
+ width: 170; height: 120
+ color: "green"; antialiasing: true
+
+ WheelHandler {
+ property: "rotation"
+ acceptedModifiers: Qt.ControlModifier
+ }
+
+ WheelHandler {
+ property: "scale"
+ acceptedModifiers: Qt.NoModifier
+ }
+}
+//![entire]
diff --git a/src/quick/doc/snippets/pointerHandlers/wheelHandlerMargin.qml b/src/quick/doc/snippets/pointerHandlers/wheelHandlerMargin.qml
new file mode 100644
index 0000000000..82a4fd744b
--- /dev/null
+++ b/src/quick/doc/snippets/pointerHandlers/wheelHandlerMargin.qml
@@ -0,0 +1,15 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+//![entire]
+import QtQuick
+
+Rectangle {
+ width: 170; height: 120
+ color: "green"; antialiasing: true
+
+ WheelHandler {
+ property: "rotation"
+ margin: 10
+ }
+}
+//![entire]