The Qt3DCore::QMouseEvent contains parameters that describe a mouse event. More...
Header: | #include <Qt3DInput/QMouseEvent> |
qmake: | QT += 3dinput |
Since: | Qt 5.5 |
Instantiated By: | MouseEvent |
Inherits: | QObject |
This class was introduced in Qt 5.5.
enum | Buttons { LeftButton, RightButton, MiddleButton, BackButton, NoButton } |
enum | Modifiers { NoModifier, ShiftModifier, ControlModifier, AltModifier, MetaModifier, KeypadModifier } |
QMouseEvent(const ::QMouseEvent &e) | |
Qt3DInput::QMouseEvent::Buttons | button() const |
int | buttons() const |
bool | isAccepted() const |
Qt3DInput::QMouseEvent::Modifiers | modifiers() const |
void | setAccepted(bool accepted) |
QEvent::Type | type() const |
bool | wasHeld() const |
int | x() const |
int | y() const |
typedef | QMouseEventPtr |
Mouse events occur when a mouse button is pressed and the ray traversing the view, originating from the mouse position intersects with one or more elements of the scene.
See also QKeyEvent, QWheelEvent, and QMouseHandler.
Constant | Value |
---|---|
Qt3DInput::QMouseEvent::LeftButton |
Qt::LeftButton |
Qt3DInput::QMouseEvent::RightButton |
Qt::RightButton |
Qt3DInput::QMouseEvent::MiddleButton |
Qt::MiddleButton |
Qt3DInput::QMouseEvent::BackButton |
Qt::BackButton |
Qt3DInput::QMouseEvent::NoButton |
Qt::NoButton |
Constant | Value |
---|---|
Qt3DInput::QMouseEvent::NoModifier |
Qt::NoModifier |
Qt3DInput::QMouseEvent::ShiftModifier |
Qt::ShiftModifier |
Qt3DInput::QMouseEvent::ControlModifier |
Qt::ControlModifier |
Qt3DInput::QMouseEvent::AltModifier |
Qt::AltModifier |
Qt3DInput::QMouseEvent::MetaModifier |
Qt::MetaModifier |
Qt3DInput::QMouseEvent::KeypadModifier |
Qt::KeypadModifier |
Specifies if the mouse event has been accepted
Access functions:
bool | isAccepted() const |
void | setAccepted(bool accepted) |
Specifies the button triggering the mouse event
Access functions:
Qt3DInput::QMouseEvent::Buttons | button() const |
Specifies the button triggering the mouse event
Access functions:
int | buttons() const |
Specifies if any modifiers were applied to the mouse event
Access functions:
Qt3DInput::QMouseEvent::Modifiers | modifiers() const |
Specifies if a mouse button was held down during the mouse event
Access functions:
bool | wasHeld() const |
Specifies The X coordinate of the mouse event
Access functions:
int | x() const |
Specifies The y coordinate of the mouse event
Access functions:
int | y() const |
Constructs a new QMouseEvent instance for the QMouseEvent e.
Returns the mouse button of the mouse event.
Note: Getter function for property button.
Returns a bitfield to be used to check for mouse buttons that may be accompanying the mouse event.
Note: Getter function for property buttons.
Returns whether the event was accepted.
Note: Getter function for property accepted.
Returns the keyboard modifiers that may be accompanying the mouse event.
Note: Getter function for property modifiers.
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().
Returns the QEvent::Type of the event.
Returns the x position of the mouse event.
Note: Getter function for property x.
Returns the y position of the mouse event.
Note: Getter function for property y.
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-5.15/qt3dinput-qmouseevent.html