Obsolete Members for QWheelEvent | Qt GUI 5.12.8

Qt 5.12 | Qt GUI | C++ Classes | QWheelEvent

Qt 5.12.8 Reference Documentation

# Obsolete Members for QWheelEvent

The following members of class QWheelEvent are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.

## Public Functions

`(obsolete)` | QWheelEvent(const QPointF &pos, const QPointF &globalPos, int delta, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::Orientation orient = Qt::Vertical)
`(obsolete)` | QWheelEvent(const QPointF &pos, int delta, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::Orientation orient = Qt::Vertical)
`(obsolete)` int | delta() const
`(obsolete)` Qt::Orientation | orientation() const

## Member Function Documentation

### QWheelEvent::QWheelEvent(const QPointF &pos, const QPointF &globalPos, int delta, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::Orientation orient = Qt::Vertical)

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Constructs a wheel event object.

Use the constructor taking angleDelta and pixelDelta QPoints instead.

The pos provides the location of the mouse cursor within the widget. The position in global coordinates is specified by globalPos. delta contains the rotation distance, modifiers holds the keyboard modifier flags at the time of the event, and orient holds the wheel's orientation.

See also pos(), pixelDelta(), and angleDelta().

### QWheelEvent::QWheelEvent(const QPointF &pos, int delta, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::Orientation orient = Qt::Vertical)

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Constructs a wheel event object.

Use the constructor taking angleDelta and pixelDelta QPoints instead.

The position, pos, is the location of the mouse cursor within the widget. The globalPos() is initialized to QCursor::pos() which is usually, but not always, correct. Use the other constructor if you need to specify the global position explicitly.

The buttons describe the state of the mouse buttons at the time of the event, delta contains the rotation distance, modifiers holds the keyboard modifier flags at the time of the event, and orient holds the wheel's orientation.

See also pos(), pixelDelta(), and angleDelta().

### int QWheelEvent::delta() const

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

This function has been deprecated, use pixelDelta() or angleDelta() instead.

### Qt::Orientation QWheelEvent::orientation() const

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Returns the wheel's orientation.

Use angleDelta() instead.