QSinglePointEvent¶
A base class for pointer events containing a single point, such as mouse events. More…
Inherited by: QWheelEvent, QTabletEvent, QNativeGestureEvent, QMouseEvent, QHoverEvent, QEnterEvent
New in version 6.0.
Synopsis¶
Functions¶
def
button
()def
buttons
()def
exclusivePointGrabber
()def
globalPosition
()def
position
()def
scenePosition
()def
setExclusivePointGrabber
(exclusiveGrabber)
Detailed Description¶
- class PySide6.QtGui.QSinglePointEvent(type, dev, point, button, buttons, modifiers, source)¶
PySide6.QtGui.QSinglePointEvent(type, dev, localPos, scenePos, globalPos, button, buttons, modifiers[, source=Qt.MouseEventNotSynthesized])
PySide6.QtGui.QSinglePointEvent(arg__1)
- Parameters
globalPos –
PySide6.QtCore.QPointF
modifiers –
KeyboardModifiers
source –
MouseEventSource
type –
Type
arg__1 –
PySide6.QtGui.QSinglePointEvent
point –
PySide6.QtGui.QEventPoint
scenePos –
PySide6.QtCore.QPointF
button –
MouseButton
localPos –
PySide6.QtCore.QPointF
buttons –
MouseButtons
- PySide6.QtGui.QSinglePointEvent.button()¶
- Return type
Returns the button that caused the event.
The returned value is always NoButton
for mouse move events, as well as TabletMove
, TabletEnterProximity
, and TabletLeaveProximity
events.
See also
- PySide6.QtGui.QSinglePointEvent.buttons()¶
- Return type
MouseButtons
Returns the button state when the event was generated.
The button state is a combination of LeftButton
, RightButton
, and MiddleButton
using the OR operator.
For mouse move or TabletMove
events, this is all buttons that are pressed down.
For mouse press, double click, or TabletPress
events, this includes the button that caused the event.
For mouse release or TabletRelease
events, this excludes the button that caused the event.
See also
- PySide6.QtGui.QSinglePointEvent.exclusivePointGrabber()¶
- Return type
This property holds the object that will receive future updates.
The exclusive grabber is an object that has chosen to receive all future update events and the release event containing the same point that this event carries.
Setting the property is a convenience equivalent to:
setExclusiveGrabber(points().first(), exclusiveGrabber);
- PySide6.QtGui.QSinglePointEvent.globalPosition()¶
- Return type
Returns the position of the point in this event on the screen or virtual desktop.
Note
The global position of a mouse pointer is recorded at the time of the event. This is important on asynchronous window systems such as X11; whenever you move your widgets around in response to mouse events, can differ a lot from the current cursor position returned by pos()
.
See also
- PySide6.QtGui.QSinglePointEvent.position()¶
- Return type
Returns the position of the point in this event, relative to the widget or item that received the event.
If you move your widgets around in response to mouse events, use globalPosition()
instead.
See also
- PySide6.QtGui.QSinglePointEvent.scenePosition()¶
- Return type
Returns the position of the point in this event, relative to the window or scene.
See also
- PySide6.QtGui.QSinglePointEvent.setExclusivePointGrabber(exclusiveGrabber)¶
- Parameters
exclusiveGrabber –
PySide6.QtCore.QObject
This property holds the object that will receive future updates.
The exclusive grabber is an object that has chosen to receive all future update events and the release event containing the same point that this event carries.
Setting the property is a convenience equivalent to:
setExclusiveGrabber(points().first(), exclusiveGrabber);
© 2022 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.