![]() |
Home · All Classes · All Functions · Overviews |
The MouseEvent object provides information about a mouse event. More...
The position of the mouse can be found via the x and y properties. The button that caused the event is available via the button property.
This property holds the button that caused the event. It can be one of:
read-onlybuttons : int |
This property holds the mouse buttons pressed when the event was generated. For mouse move events, this is all buttons that are pressed down. For mouse press and double click events this includes the button that caused the event. For mouse release events this excludes the button that caused the event.
It contains a bitwise combination of:
read-onlymodifiers : int |
This property holds the keyboard modifier flags that existed immediately before the event occurred.
It contains a bitwise combination of:
For example, to react to a Shift key + Left mouse button click:
MouseArea { onClicked: { if (mouse.button == Qt.LeftButton && mouse.modifiers & Qt.ShiftModifier) doSomething(); } }
read-onlywasHeld : bool |
This property is true if the mouse button has been held pressed longer the threshold (800ms).
Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies) | Trademarks | Qt 4.7.0 |