class QPointerEvent

A base class for pointer events. More

Inheritance diagram of PySide6.QtGui.QPointerEvent

Inherited by: QTouchEvent, QSinglePointEvent, QWheelEvent, QTabletEvent, QNativeGestureEvent, QMouseEvent, QHoverEvent, QEnterEvent

Synopsis

Methods

Virtual methods

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

Detailed Description

__init__(arg__1)
Parameters:

arg__1QPointerEvent

__init__(type, dev[, modifiers=Qt.NoModifier[, points={}]])
Parameters:
__repr__()
Return type:

str

addPassiveGrabber(point, grabber)
Parameters:
Return type:

bool

Informs the delivery logic that the given grabber is to receive all future update events and the release event containing the given point, regardless where else those events may be delivered.

It’s only for use by Qt Quick Input Handlers.

Returns false if grabber was already added, true otherwise.

allPointsAccepted()
Return type:

bool

Returns true if isPointAccepted() is true for every point in points() ; otherwise false.

allPointsGrabbed()
Return type:

bool

Returns true if every point in points() has either an exclusiveGrabber() or one or more passiveGrabbers() .

clearPassiveGrabbers(point)
Parameters:

pointQEventPoint

Removes all passive grabbers from the given point.

It’s only for use by Qt Quick Input Handlers.

exclusiveGrabber(point)
Parameters:

pointQEventPoint

Return type:

QObject

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.

isBeginEvent()
Return type:

bool

isEndEvent()
Return type:

bool

isUpdateEvent()
Return type:

bool

point(i)
Parameters:

i – int

Return type:

QEventPoint

Returns a QEventPoint reference for the point at index i.

pointById(id)
Parameters:

id – int

Return type:

QEventPoint

Returns the point whose id matches the given id, or nullptr if no such point is found.

pointCount()
Return type:

int

Returns the number of points in this pointer event.

pointerType()
Return type:

PointerType

Returns the type of point that generated the event.

pointingDevice()
Return type:

QPointingDevice

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:
Return type:

bool

Removes the passive grabber from the given point if it was previously added. Returns true if it had been a passive grabber before, false if not.

It’s only for use by Qt Quick Input Handlers.

setExclusiveGrabber(point, exclusiveGrabber)
Parameters:

Informs the delivery logic that the given exclusiveGrabber is to receive all future update events and the release event containing the given point, and that delivery to other items can be skipped.

It’s mainly for use in Qt Quick at this time.