diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2021-01-07 21:41:05 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2021-01-08 12:02:15 +0100 |
commit | a87621ae156524836dac23275d9076dc65540ba4 (patch) | |
tree | a6c60c4679ae8033048a8e1d0ee4066beb1ff1da | |
parent | 0604d598b0714205fe07fa1bd7c605d4578f8ee0 (diff) |
doc: Override the docs for the WheelHandler::acceptedDevices property
The existing docs were inherited from
PointerDeviceHandler::acceptedDevices and contained the statement
"By default, this property is set to AllDevices", which is true for many
handlers, but not WheelHandler.
Fixes: QTBUG-89861
Change-Id: I5227037ffbecedc8fdd19750e60c421383ec5581
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
-rw-r--r-- | src/quick/handlers/qquickwheelhandler.cpp | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/src/quick/handlers/qquickwheelhandler.cpp b/src/quick/handlers/qquickwheelhandler.cpp index 563bf16b49..18e03aa220 100644 --- a/src/quick/handlers/qquickwheelhandler.cpp +++ b/src/quick/handlers/qquickwheelhandler.cpp @@ -78,16 +78,8 @@ Q_LOGGING_CATEGORY(lcWheelHandler, "qt.quick.handler.wheel") property, or you can implement \c onWheel and handle the wheel event directly. - WheelHandler handles only a rotating mouse wheel by default. - Optionally it can handle smooth-scrolling events from touchpad gestures, - by setting \l {QtQuick::PointerDeviceHandler::}{acceptedDevices} to - \c{PointerDevice.Mouse | PointerDevice.TouchPad}. - - \note Some non-mouse hardware (such as a touch-sensitive Wacom tablet, or - a Linux laptop touchpad) generates real wheel events from gestures. - WheelHandler will respond to those events as wheel events regardless of the - setting of the \l {QtQuick::PointerDeviceHandler::}{acceptedDevices} - property. + WheelHandler handles only a rotating mouse wheel by default; this + can be changed by setting acceptedDevices. \sa MouseArea, Flickable */ @@ -532,4 +524,23 @@ QMetaProperty &QQuickWheelHandlerPrivate::targetMetaProperty() const return metaProperty; } +/*! + \qmlproperty flags WheelHandler::acceptedDevices + + The types of pointing devices that can activate this handler. + + By default, this property is set to + \l{QInputDevice::DeviceType}{PointerDevice.Mouse}, so as to react only to + events events from an actual mouse wheel. + + WheelHandler can be made to respond to both mouse wheel and touchpad + scrolling by setting acceptedDevices to + \c{PointerDevice.Mouse | PointerDevice.TouchPad}. + + \note Some non-mouse hardware (such as a touch-sensitive Wacom tablet, or a + Linux laptop touchpad) generates real wheel events from gestures. + WheelHandler will respond to those events as wheel events even if + \c acceptedDevices remains set to its default value. +*/ + QT_END_NAMESPACE |