diff options
Diffstat (limited to 'src/quick/doc/snippets/pointerHandlers/wheelHandler.qml')
-rw-r--r-- | src/quick/doc/snippets/pointerHandlers/wheelHandler.qml | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/quick/doc/snippets/pointerHandlers/wheelHandler.qml b/src/quick/doc/snippets/pointerHandlers/wheelHandler.qml new file mode 100644 index 0000000000..1740b7bfe0 --- /dev/null +++ b/src/quick/doc/snippets/pointerHandlers/wheelHandler.qml @@ -0,0 +1,17 @@ +// Copyright (C) 2019 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause +//![0] +import QtQuick + +Rectangle { + width: 170; height: 120 + color: "green"; antialiasing: true + + WheelHandler { + property: "rotation" + onWheel: (event)=> console.log("rotation", event.angleDelta.y, + "scaled", rotation, "@", point.position, + "=>", parent.rotation) + } +} +//![0] |