PySide6.QtWidgets.QGraphicsSceneWheelEvent¶
- class QGraphicsSceneWheelEvent¶
The
QGraphicsSceneWheelEvent
class provides wheel events in the graphics view framework. More…Synopsis¶
Methods¶
def
__init__()
def
buttons()
def
delta()
def
isInverted()
def
modifiers()
def
orientation()
def
phase()
def
pixelDelta()
def
pos()
def
scenePos()
def
screenPos()
def
setButtons()
def
setDelta()
def
setInverted()
def
setModifiers()
def
setOrientation()
def
setPhase()
def
setPixelDelta()
def
setPos()
def
setScenePos()
def
setScreenPos()
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¶
The
QGraphicsSceneWheelEvent
class provides wheel events in the graphics view framework.QWheelEvents received by a
QGraphicsView
are translated into QGraphicsSceneWheelEvents; it translates the QWheelEvent::globalPos() into item, scene, and screen coordinates (pos()
,scenePos()
, andscreenPos()
).- buttons()¶
- Return type:
Combination of
MouseButton
Returns the mouse buttons that were pressed when the wheel event occurred.
See also
- delta()¶
- Return type:
int
Returns the distance that the wheel is rotated, in eighths (1/8s) of a degree. A positive value indicates that the wheel was rotated forwards away from the user; a negative value indicates that the wheel was rotated backwards toward the user.
Most mouse types work in steps of 15 degrees, in which case the delta value is a multiple of 120 (== 15 * 8).
- isInverted()¶
- Return type:
bool
Returns whether the delta values delivered with the event are inverted.
- modifiers()¶
- Return type:
Combination of
KeyboardModifier
Returns the keyboard modifiers that were active when the wheel event occurred.
See also
- orientation()¶
- Return type:
Returns the wheel orientation.
- phase()¶
- Return type:
Returns the scrolling phase of this wheel event.
See also
phase
Returns the scrolling distance in pixels on screen. This value is provided on platforms that support high-resolution pixel-based delta values, such as macOS. The value should be used directly to scroll content on screen.
See also
pixelDelta
Returns the position of the cursor in item coordinates when the wheel event occurred.
See also
Returns the position of the cursor in scene coordinates when the wheel event occurred.
See also
Returns the position of the cursor in screen coordinates when the wheel event occurred.
See also
- setButtons(buttons)¶
- Parameters:
buttons – Combination of
MouseButton
- setDelta(delta)¶
- Parameters:
delta – int
- setInverted(inverted)¶
- Parameters:
inverted – bool
- setModifiers(modifiers)¶
- Parameters:
modifiers – Combination of
KeyboardModifier
- setOrientation(orientation)¶
- Parameters:
orientation –
Orientation
- setPhase(scrollPhase)¶
- Parameters:
scrollPhase –
ScrollPhase