class QGraphicsSceneWheelEvent#

The QGraphicsSceneWheelEvent class provides wheel events in the graphics view framework. More

Inheritance diagram of PySide6.QtWidgets.QGraphicsSceneWheelEvent

Synopsis#

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#

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() , and screenPos() ).

__init__([type=QEvent.Type.None])#
Parameters:

typeType

buttons()#
Return type:

Combination of MouseButton

Returns the mouse buttons that were pressed when the wheel event occurred.

See also

modifiers()

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

buttons()

orientation()#
Return type:

Orientation

Returns the wheel orientation.

phase()#
Return type:

ScrollPhase

Returns the scrolling phase of this wheel event.

See also

phase

pixelDelta()#
Return type:

QPoint

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

pos()#
Return type:

QPointF

Returns the position of the cursor in item coordinates when the wheel event occurred.

scenePos()#
Return type:

QPointF

Returns the position of the cursor in scene coordinates when the wheel event occurred.

See also

pos() screenPos()

screenPos()#
Return type:

QPoint

Returns the position of the cursor in screen coordinates when the wheel event occurred.

See also

pos() scenePos()

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:

orientationOrientation

setPhase(scrollPhase)#
Parameters:

scrollPhaseScrollPhase

setPixelDelta(delta)#
Parameters:

deltaQPoint

setPos(pos)#
Parameters:

posQPointF

setScenePos(pos)#
Parameters:

posQPointF

setScreenPos(pos)#
Parameters:

posQPoint