QGraphicsSceneWheelEvent Class

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

Header: #include <QGraphicsSceneWheelEvent>
qmake: QT += widgets
Since: Qt 4.2
Inherits: QGraphicsSceneEvent

Public Functions

virtual ~QGraphicsSceneWheelEvent()
Qt::MouseButtons buttons() const
int delta() const
Qt::KeyboardModifiers modifiers() const
Qt::Orientation orientation() const
QPointF pos() const
QPointF scenePos() const
QPoint screenPos() const

Additional Inherited Members

  • 1 property inherited from QEvent
  • 1 public variable inherited from QEvent
  • 1 static public member inherited from QEvent
  • 2 protected variables inherited from QEvent

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.

Member Function Documentation

[virtual] QGraphicsSceneWheelEvent::~QGraphicsSceneWheelEvent()

Destroys the QGraphicsSceneWheelEvent.

Qt::MouseButtons QGraphicsSceneWheelEvent::buttons() const

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

See also modifiers().

int QGraphicsSceneWheelEvent::delta() const

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

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

See also buttons().

Qt::Orientation QGraphicsSceneWheelEvent::orientation() const

Returns the wheel orientation.

QPointF QGraphicsSceneWheelEvent::pos() const

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

See also scenePos() and screenPos().

QPointF QGraphicsSceneWheelEvent::scenePos() const

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

See also pos() and screenPos().

QPoint QGraphicsSceneWheelEvent::screenPos() const

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

See also pos() and scenePos().

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support