QWheelEvent Class

(Qt3DInput::QWheelEvent)

The QWheelEvent class contains parameters that describe a mouse wheel event. More...

Header: #include <Qt3DInput/QWheelEvent>
qmake: QT += 3dinput
Since: Qt 5.5
Instantiated By: WheelEvent
Inherits: QObject

Public Types

enum Buttons { LeftButton, RightButton, MiddleButton, BackButton, NoButton }
enum Modifiers { NoModifier, ShiftModifier, ControlModifier, AltModifier, MetaModifier, KeypadModifier }

Properties

  • modifiers : const Qt3DInput::QWheelEvent::Modifiers
  • x : const int
  • y : const int
  • 1 property inherited from QObject

Public Functions

QWheelEvent(const ::QWheelEvent &e)
virtual ~QWheelEvent()
QPoint angleDelta() const
int buttons() const
bool isAccepted() const
Qt3DInput::QWheelEvent::Modifiers modifiers() const
void setAccepted(bool accepted)
QEvent::Type type() const
int x() const
int y() const
  • 31 public functions inherited from QObject

Static Public Members

const QMetaObject staticMetaObject
  • 9 static public members inherited from QObject
typedef QWheelEventPtr

Additional Inherited Members

  • 1 public slot inherited from QObject
  • 2 signals inherited from QObject
  • 9 protected functions inherited from QObject

Detailed Description

The QWheelEvent class contains parameters that describe a mouse wheel event.

Mouse wheel events occur when the mouse is rotated.

See also QKeyEvent, QMouseEvent, and QMouseHandler.

Member Type Documentation

enum QWheelEvent::Buttons

Constant Value
Qt3DInput::QWheelEvent::LeftButton Qt::LeftButton
Qt3DInput::QWheelEvent::RightButton Qt::RightButton
Qt3DInput::QWheelEvent::MiddleButton Qt::MiddleButton
Qt3DInput::QWheelEvent::BackButton Qt::BackButton
Qt3DInput::QWheelEvent::NoButton Qt::NoButton

enum QWheelEvent::Modifiers

Constant Value
Qt3DInput::QWheelEvent::NoModifier Qt::NoModifier
Qt3DInput::QWheelEvent::ShiftModifier Qt::ShiftModifier
Qt3DInput::QWheelEvent::ControlModifier Qt::ControlModifier
Qt3DInput::QWheelEvent::AltModifier Qt::AltModifier
Qt3DInput::QWheelEvent::MetaModifier Qt::MetaModifier
Qt3DInput::QWheelEvent::KeypadModifier Qt::KeypadModifier

Property Documentation

accepted : bool

Specifies if the mouse wheel event has been accepted

Access functions:

bool isAccepted() const
void setAccepted(bool accepted)

angleDelta : const QPoint

Specifies The change wheel angle of the mouse wheel event

Access functions:

QPoint angleDelta() const

buttons : const int

Specifies the button if present in the mouse wheel event

Access functions:

int buttons() const

modifiers : const Qt3DInput::QWheelEvent::Modifiers

Specifies if any modifiers were applied to the mouse wheel event

Access functions:

Qt3DInput::QWheelEvent::Modifiers modifiers() const

x : const int

Specifies The X coordinate of the mouse wheel event

Access functions:

int x() const

y : const int

Specifies The Y coordinate of the mouse wheel event

Access functions:

int y() const

Member Function Documentation

QWheelEvent::QWheelEvent(const ::QWheelEvent &e)

Constructs a new QWheelEvent instance from the QWheelEvent e.

[virtual] QWheelEvent::~QWheelEvent()

Destroys the instance of QWheelEvent. The destructor is virtual.

QPoint QWheelEvent::angleDelta() const

Returns the distance that the wheel is rotated, in eighths of a degree. A positive value indicates that the wheel was rotated forward (away from the user), a negative value indicates the wheel was rotated backward (toward the user).

Note: Getter function for property angleDelta.

int QWheelEvent::buttons() const

Returns a bitfield to be used to check for mouse buttons that may be accompanying the wheel event.

Note: Getter function for property buttons.

bool QWheelEvent::isAccepted() const

Returns whether the event was accepted.

Note: Getter function for property accepted.

Qt3DInput::QWheelEvent::Modifiers QWheelEvent::modifiers() const

Returns the keyboard modifiers that may be accompanying the wheel event.

Note: Getter function for property modifiers.

void QWheelEvent::setAccepted(bool accepted)

Sets the event as accepted if accepted is true.

Note: When an event is accepted, it will prevent further propagation to other listeners.

Note: Setter function for property accepted.

See also isAccepted().

QEvent::Type QWheelEvent::type() const

Returns the QEvent::Type of the event.

int QWheelEvent::x() const

Returns the x position of the mouse event.

Note: Getter function for property x.

int QWheelEvent::y() const

Returns the x position of the mouse event.

Note: Getter function for property y.

Related Non-Members

typedef Qt3DInput::QWheelEventPtr

A shared pointer for QWheelEvent.

© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-5.12/qt3dinput-qwheelevent.html