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#

Functions#

Virtual functions#

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#

class PySide6.QtGui.QPointerEvent(type, dev[, modifiers=Qt.NoModifier[, points={}]])#

PySide6.QtGui.QPointerEvent(arg__1)

Parameters:
PySide6.QtGui.QPointerEvent.__repr__()#
Return type:

object

PySide6.QtGui.QPointerEvent.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.

PySide6.QtGui.QPointerEvent.allPointsAccepted()#
Return type:

bool

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

PySide6.QtGui.QPointerEvent.allPointsGrabbed()#
Return type:

bool

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

PySide6.QtGui.QPointerEvent.clearPassiveGrabbers(point)#
Parameters:

pointPySide6.QtGui.QEventPoint

Removes all passive grabbers from the given point.

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

PySide6.QtGui.QPointerEvent.exclusiveGrabber(point)#
Parameters:

pointPySide6.QtGui.QEventPoint

Return type:

PySide6.QtCore.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.

PySide6.QtGui.QPointerEvent.isBeginEvent()#
Return type:

bool

PySide6.QtGui.QPointerEvent.isEndEvent()#
Return type:

bool

PySide6.QtGui.QPointerEvent.isUpdateEvent()#
Return type:

bool

PySide6.QtGui.QPointerEvent.point(i)#
Parameters:

iqsizetype

Return type:

PySide6.QtGui.QEventPoint

Returns a QEventPoint reference for the point at index i.

PySide6.QtGui.QPointerEvent.pointById(id)#
Parameters:

id – int

Return type:

PySide6.QtGui.QEventPoint

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

PySide6.QtGui.QPointerEvent.pointCount()#
Return type:

qsizetype

Returns the number of points in this pointer event.

PySide6.QtGui.QPointerEvent.pointerType()#
Return type:

PointerType

Returns the type of point that generated the event.

PySide6.QtGui.QPointerEvent.pointingDevice()#
Return type:

PySide6.QtGui.QPointingDevice

Returns the source device from which this event originates.

This is the same as device() but typecast for convenience.

PySide6.QtGui.QPointerEvent.points()#

Returns a list of points in this pointer event.

PySide6.QtGui.QPointerEvent.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 .

PySide6.QtGui.QPointerEvent.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.