PointerEvent QML Type
Provides information about an event from a pointing device. More...
|import QtQuick 2.15
A PointerEvent is an event describing contact or movement across a surface, provided by a mouse, a touchpoint (single finger on a touchscreen), or a stylus on a graphics tablet. The device property provides more information about where the event came from.
See also PointerHandler.
[read-only] button : enumeration
[read-only] buttons : int
This property holds the combination of mouse or stylus buttons pressed when the event was generated. For move events, this is all buttons that are pressed down. For press events, this includes the button that caused the event, as well as any others that were already held. For release events, this excludes the button that caused the event.
[read-only] device : PointerDevice
This property holds the device that generated the event.
[read-only] modifiers : int
This property holds the keyboard modifier flags that existed immediately before the event occurred.
It contains a bitwise combination of the following flags:
|No modifier key is pressed.
|A Shift key on the keyboard is pressed.
|A Ctrl key on the keyboard is pressed.
|An Alt key on the keyboard is pressed.
|A Meta key on the keyboard is pressed.
|A keypad button is pressed.
For example, to react to a Shift key + Left mouse button click:
© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.