PySide6.QtGui.QPointerEvent¶
- class QPointerEvent¶
- A base class for pointer events. More… - Inherited by: - QTouchEvent,- QSinglePointEvent,- QWheelEvent,- QTabletEvent,- QNativeGestureEvent,- QMouseEvent,- QHoverEvent,- QEnterEvent- Synopsis¶- 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 - Detailed Description¶- __init__(arg__1)¶
- Parameters:
- arg__1 – - QPointerEvent
 
 - __init__(type, dev[, modifiers=Qt.NoModifier[, points={}]])
- Parameters:
- type – - Type
- dev – - QPointingDevice
- modifiers – Combination of - KeyboardModifier
- points – .list of QEventPoint 
 
 
 - __repr__()¶
- Return type:
- str 
 
 - addPassiveGrabber(point, grabber)¶
- Parameters:
- point – - QEventPoint
- grabber – - QObject
 
- Return type:
- bool 
 
 - Informs the delivery logic that the given - grabberis 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 - falseif- grabberwas already added,- trueotherwise.- allPointsAccepted()¶
- Return type:
- bool 
 
 - Returns - trueif isPointAccepted() is- truefor every point in- points(); otherwise- false.- allPointsGrabbed()¶
- Return type:
- bool 
 
 - Returns - trueif every point in- points()has either an- exclusiveGrabber()or one or more- passiveGrabbers().- 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 index- i.- pointById(id)¶
- Parameters:
- id – int 
- Return type:
 
 - Returns the point whose - idmatches the given- id, or- nullptrif 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 – - QEventPoint
- grabber – - QObject
 
- Return type:
- bool 
 
 - Removes the passive - grabberfrom the given- pointif it was previously added. Returns- trueif 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 – - QEventPoint
- exclusiveGrabber – - QObject
 
 
 - Informs the delivery logic that the given - exclusiveGrabberis 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. - See also