QGraphicsSceneWheelEvent#

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

Inheritance diagram of PySide6.QtWidgets.QGraphicsSceneWheelEvent

Synopsis#

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#

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

QWheelEvent s received by a QGraphicsView are translated into QGraphicsSceneWheelEvents; it translates the QWheelEvent::globalPos() into item, scene, and screen coordinates ( pos() , scenePos() , and screenPos() ).

class PySide6.QtWidgets.QGraphicsSceneWheelEvent([type=QEvent.Type.None])#
Parameters:

typeType

PySide6.QtWidgets.QGraphicsSceneWheelEvent.buttons()#
Return type:

MouseButtons

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

See also

modifiers()

PySide6.QtWidgets.QGraphicsSceneWheelEvent.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).

PySide6.QtWidgets.QGraphicsSceneWheelEvent.isInverted()#
Return type:

bool

Returns whether the delta values delivered with the event are inverted.

PySide6.QtWidgets.QGraphicsSceneWheelEvent.modifiers()#
Return type:

KeyboardModifiers

Returns the keyboard modifiers that were active when the wheel event occurred.

See also

buttons()

PySide6.QtWidgets.QGraphicsSceneWheelEvent.orientation()#
Return type:

Orientation

Returns the wheel orientation.

PySide6.QtWidgets.QGraphicsSceneWheelEvent.phase()#
Return type:

ScrollPhase

Returns the scrolling phase of this wheel event.

See also

phase

PySide6.QtWidgets.QGraphicsSceneWheelEvent.pixelDelta()#
Return type:

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

PySide6.QtWidgets.QGraphicsSceneWheelEvent.pos()#
Return type:

PySide6.QtCore.QPointF

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

PySide6.QtWidgets.QGraphicsSceneWheelEvent.scenePos()#
Return type:

PySide6.QtCore.QPointF

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

See also

pos() screenPos()

PySide6.QtWidgets.QGraphicsSceneWheelEvent.screenPos()#
Return type:

PySide6.QtCore.QPoint

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

See also

pos() scenePos()

PySide6.QtWidgets.QGraphicsSceneWheelEvent.setButtons(buttons)#
Parameters:

buttonsMouseButtons

PySide6.QtWidgets.QGraphicsSceneWheelEvent.setDelta(delta)#
Parameters:

delta – int

PySide6.QtWidgets.QGraphicsSceneWheelEvent.setInverted(inverted)#
Parameters:

inverted – bool

PySide6.QtWidgets.QGraphicsSceneWheelEvent.setModifiers(modifiers)#
Parameters:

modifiersKeyboardModifiers

PySide6.QtWidgets.QGraphicsSceneWheelEvent.setOrientation(orientation)#
Parameters:

orientationOrientation

PySide6.QtWidgets.QGraphicsSceneWheelEvent.setPhase(scrollPhase)#
Parameters:

scrollPhaseScrollPhase

PySide6.QtWidgets.QGraphicsSceneWheelEvent.setPixelDelta(delta)#
Parameters:

deltaPySide6.QtCore.QPoint

PySide6.QtWidgets.QGraphicsSceneWheelEvent.setPos(pos)#
Parameters:

posPySide6.QtCore.QPointF

PySide6.QtWidgets.QGraphicsSceneWheelEvent.setScenePos(pos)#
Parameters:

posPySide6.QtCore.QPointF

PySide6.QtWidgets.QGraphicsSceneWheelEvent.setScreenPos(pos)#
Parameters:

posPySide6.QtCore.QPoint