PySide6.QtGui.QSinglePointEvent¶
- class QSinglePointEvent¶
A base class for pointer events containing a single point, such as mouse events.
Inherited by:
QWheelEvent,QTabletEvent,QNativeGestureEvent,QMouseEvent,QHoverEvent,QEnterEventSynopsis¶
Properties¶
exclusivePointGrabberᅟ- The object that will receive future updates
Methods¶
def
__init__()def
button()def
buttons()def
globalPosition()def
position()def
scenePosition()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Note
Properties can be used directly when
from __feature__ import true_propertyis used or via accessor functions otherwise.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 exclusivePointGrabber property is a convenience equivalent to:
setExclusiveGrabber(points().first(), exclusiveGrabber);
- Access functions:
- __init__(arg__1)¶
- Parameters:
arg__1 –
QSinglePointEvent
- __init__(type, dev, point, button, buttons, modifiers, source)
- Parameters:
type –
Typedev –
QPointingDevicepoint –
QEventPointbutton –
MouseButtonbuttons – Combination of
MouseButtonmodifiers – Combination of
KeyboardModifiersource –
MouseEventSource
- __init__(type, dev, localPos, scenePos, globalPos, button, buttons, modifiers[, source=Qt.MouseEventNotSynthesized])
- Parameters:
type –
Typedev –
QPointingDevicelocalPos –
QPointFscenePos –
QPointFglobalPos –
QPointFbutton –
MouseButtonbuttons – Combination of
MouseButtonmodifiers – Combination of
KeyboardModifiersource –
MouseEventSource
- button()¶
- Return type:
Returns the button that caused the event.
The returned value is always Qt::NoButton for mouse move events, as well as TabletMove, TabletEnterProximity, and TabletLeaveProximity events.
See also
- buttons()¶
- Return type:
Combination of
MouseButton
Returns the button state when the event was generated.
The button state is a combination of Qt::LeftButton, Qt::RightButton, and Qt::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
- exclusivePointGrabber()¶
- Return type:
See also
Getter of property
exclusivePointGrabberᅟ.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, globalPosition() can differ a lot from the current cursor position returned by
pos().See also
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
Returns the position of the point in this event, relative to the window or scene.
See also
Setter of property
exclusivePointGrabberᅟ.