QWheelEvent Class
The QWheelEvent class contains parameters that describe a wheel event. More…
| Header | #include <QWheelEvent> |
|---|---|
| CMake | target_link_libraries(app PRIVATE Nt::Gui) |
| Module | Nt GUI C++ Classes |
| Inherits | QInputEvent |
List of all members, including inherited members
Public Functions
| QWheelEvent(const QPointF &pos, const QPointF &globalPos, const QPoint &pixelDelta, const QPoint &angleDelta, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers) | |
| QPoint | pixelDelta() const |
| QPoint | angleDelta() const |
| Qt::MouseButtons | buttons() const |
| QPointF | position() const |
| QPointF | globalPosition() const |
Reimplemented Public Functions
| QWheelEvent * | clone() const |
Detailed Description
The angle delta is in eighths of a degree; a notch of a typical wheel is 120.
See also QMouseEvent.
Differences from Qt
There is no phase, inverted flag or source; the event is a single scroll step.
Member Function Documentation
QWheelEvent::QWheelEvent(const QPointF &pos, const QPointF &globalPos, const QPoint &pixelDelta, const QPoint &angleDelta, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers)
Constructs a wheel event for a mouse at pos in the window and globalPos on the screen, with the scroll amounts pixelDelta and angleDelta, the pressed buttons and the modifiers.
QPoint QWheelEvent::angleDelta() const
Returns the scroll amount in eighths of a degree.
Qt::MouseButtons QWheelEvent::buttons() const
Returns the buttons that were down.
QWheelEvent * QWheelEvent::clone() const
Reimplements QInputEvent::clone().
QPointF QWheelEvent::globalPosition() const
Returns the position of the mouse on the screen.
QPoint QWheelEvent::pixelDelta() const
Returns the scroll amount in pixels, or a null point if the device does not report pixels.
QPointF QWheelEvent::position() const
Returns the position of the mouse in the receiving window.