|  | Home · All Classes · Modules

# QGraphicsSceneWheelEvent Class Reference
[QtGui module]

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

Inherits QGraphicsSceneEvent.

### Methods

- __init__ (self, QEvent.Type type = QEvent.None)
- __init__ (self, QGraphicsSceneWheelEvent other)
- Qt.MouseButtons buttons (self)
- int delta (self)
- Qt.KeyboardModifiers modifiers (self)
- Qt.Orientation orientation (self)
- QPointF pos (self)
- QPointF scenePos (self)
- QPoint screenPos (self)
- setButtons (self, Qt.MouseButtons buttons)
- setDelta (self, int delta)
- setModifiers (self, Qt.KeyboardModifiers modifiers)
- setOrientation (self, Qt.Orientation orientation)
- setPos (self, QPointF pos)
- setScenePos (self, QPointF pos)
- setScreenPos (self, QPoint pos)

## Detailed Description

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

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()).

See also QGraphicsSceneMouseEvent, QGraphicsSceneContextMenuEvent, QGraphicsSceneHoverEvent, and QWheelEvent.

## Method Documentation

### QGraphicsSceneWheelEvent.__init__ (self, QEvent.Type type = QEvent.None)

### QGraphicsSceneWheelEvent.__init__ (self, QGraphicsSceneWheelEvent other)

### Qt.MouseButtons QGraphicsSceneWheelEvent.buttons (self)

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

See also modifiers().

### int QGraphicsSceneWheelEvent.delta (self)

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).

### Qt.KeyboardModifiers QGraphicsSceneWheelEvent.modifiers (self)

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

See also buttons().

### Qt.Orientation QGraphicsSceneWheelEvent.orientation (self)

Returns the wheel orientation.

### QPointF QGraphicsSceneWheelEvent.pos (self)

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

See also scenePos() and screenPos().

### QPointF QGraphicsSceneWheelEvent.scenePos (self)

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

See also pos() and screenPos().

### QPoint QGraphicsSceneWheelEvent.screenPos (self)

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

See also pos() and scenePos().

### QGraphicsSceneWheelEvent.setButtons (self, Qt.MouseButtons buttons)

### QGraphicsSceneWheelEvent.setDelta (self, int delta)

### QGraphicsSceneWheelEvent.setModifiers (self, Qt.KeyboardModifiers modifiers)

### QGraphicsSceneWheelEvent.setOrientation (self, Qt.Orientation orientation)

### QGraphicsSceneWheelEvent.setPos (self, QPointF pos)

### QGraphicsSceneWheelEvent.setScenePos (self, QPointF pos)

### QGraphicsSceneWheelEvent.setScreenPos (self, QPoint pos)