PySide6.QtGui.QPointerEvent¶
- class QPointerEvent¶
A base class for pointer events.
Inherited by:
QTouchEvent,QSinglePointEvent,QWheelEvent,QTabletEvent,QNativeGestureEvent,QMouseEvent,QHoverEvent,QEnterEventSynopsis¶
Methods¶
def
__init__()def
__repr__()def
point()def
pointById()def
pointCount()def
pointerType()def
pointingDevice()def
points()
Virtual methods¶
def
isBeginEvent()def
isEndEvent()def
isUpdateEvent()
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
- __init__(arg__1)¶
- Parameters:
arg__1 –
QPointerEvent
- __init__(type, dev[, modifiers=Qt.NoModifier[, points={}]])
- Parameters:
type –
Typedev –
QPointingDevicemodifiers – Combination of
KeyboardModifierpoints – .list of QEventPoint
- __repr__()¶
- Return type:
str
- addPassiveGrabber(point, grabber)¶
- Parameters:
point –
QEventPointgrabber –
QObject
- Return type:
bool
Informs the delivery logic that the given
grabberis to receive all future update events and the release event containing the givenpoint, regardless where else those events may be delivered.It’s only for use by Qt Quick Input Handlers.
Returns
falseifgrabberwas already added,trueotherwise.- allPointsAccepted()¶
- Return type:
bool
Returns
trueif isPointAccepted() istruefor every point inpoints(); otherwisefalse.- allPointsGrabbed()¶
- Return type:
bool
Returns
trueif every point inpoints()has either anexclusiveGrabber()or one or morepassiveGrabbers().- clearPassiveGrabbers(point)¶
- Parameters:
point –
QEventPoint
Removes all passive grabbers from the given
point.It’s only for use by Qt Quick Input Handlers.
See also
- exclusiveGrabber(point)¶
- Parameters:
point –
QEventPoint- Return type:
Returns the object which has been set to receive all future update events and the release event containing the given
point.It’s mainly for use in Qt Quick at this time.
See also
- isBeginEvent()¶
- Return type:
bool
- isEndEvent()¶
- Return type:
bool
- isUpdateEvent()¶
- Return type:
bool
- point(i)¶
- Parameters:
i – int
- Return type:
Returns a
QEventPointreference for the point at indexi.- pointById(id)¶
- Parameters:
id – int
- Return type:
Returns the point whose
idmatches the givenid, ornullptrif no such point is found.- pointCount()¶
- Return type:
int
Returns the number of points in this pointer event.
- pointerType()¶
- Return type:
Returns the type of point that generated the event.
- pointingDevice()¶
- Return type:
Returns the source device from which this event originates.
This is the same as
device()but typecast for convenience.- points()¶
- Return type:
.list of QEventPoint
Returns a list of points in this pointer event.
- removePassiveGrabber(point, grabber)¶
- Parameters:
point –
QEventPointgrabber –
QObject
- Return type:
bool
Removes the passive
grabberfrom the givenpointif it was previously added. Returnstrueif it had been a passive grabber before,falseif not.It’s only for use by Qt Quick Input Handlers.
See also
- setExclusiveGrabber(point, exclusiveGrabber)¶
- Parameters:
point –
QEventPointexclusiveGrabber –
QObject
Informs the delivery logic that the given
exclusiveGrabberis to receive all future update events and the release event containing the givenpoint, and that delivery to other items can be skipped.It’s mainly for use in Qt Quick at this time.
See also