QPointerEvent#
A base class for pointer events. More…
Inherited by: QTouchEvent, QSinglePointEvent, QWheelEvent, QTabletEvent, QNativeGestureEvent, QMouseEvent, QHoverEvent, QEnterEvent
Synopsis#
Functions#
- def - __repr__()
- def - addPassiveGrabber(point, grabber)
- def - allPointsAccepted()
- def - allPointsGrabbed()
- def - clearPassiveGrabbers(point)
- def - exclusiveGrabber(point)
- def - point(i)
- def - pointById(id)
- def - pointCount()
- def - pointerType()
- def - pointingDevice()
- def - points()
- def - removePassiveGrabber(point, grabber)
- def - setExclusiveGrabber(point, exclusiveGrabber)
Virtual functions#
- 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#
- class PySide6.QtGui.QPointerEvent(type, dev[, modifiers=Qt.NoModifier[, points={}]])#
- PySide6.QtGui.QPointerEvent(arg__1) - Parameters:
- points – 
- arg__1 – - PySide6.QtGui.QPointerEvent
- modifiers – - KeyboardModifiers
- type – - Type
 
 
- PySide6.QtGui.QPointerEvent.__repr__()#
- Return type:
- object 
 
- PySide6.QtGui.QPointerEvent.addPassiveGrabber(point, grabber)#
- Parameters:
- point – - PySide6.QtGui.QEventPoint
- grabber – - PySide6.QtCore.QObject
 
- 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:
- point – - PySide6.QtGui.QEventPoint
 
Removes all passive grabbers from the given point.
It’s only for use by Qt Quick Input Handlers .
See also
- PySide6.QtGui.QPointerEvent.exclusiveGrabber(point)#
- Parameters:
- point – - PySide6.QtGui.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
- 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:
- i – - qsizetype
- Return type:
 
Returns a QEventPoint reference for the point at index i.
- PySide6.QtGui.QPointerEvent.pointById(id)#
- Parameters:
- id – int 
- Return type:
 
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:
 
Returns the type of point that generated the event.
- PySide6.QtGui.QPointerEvent.pointingDevice()#
- Return type:
 
Returns the source device from which this event originates.
This is the same as device() but typecast for convenience.
- PySide6.QtGui.QPointerEvent.points()#
- Return type:
 
Returns a list of points in this pointer event.
- PySide6.QtGui.QPointerEvent.removePassiveGrabber(point, grabber)#
- Parameters:
- point – - PySide6.QtGui.QEventPoint
- grabber – - PySide6.QtCore.QObject
 
- 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 .
See also
- PySide6.QtGui.QPointerEvent.setExclusiveGrabber(point, exclusiveGrabber)#
- Parameters:
- point – - PySide6.QtGui.QEventPoint
- exclusiveGrabber – - PySide6.QtCore.QObject
 
 
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.
See also