QMouseEvent Class
class Qt3DInput::QMouseEventThe Qt3DCore::QMouseEvent contains parameters that describe a mouse event. More...
Header: | #include <Qt3DInput/QMouseEvent> |
qmake: | QT += 3dinput |
Since: | Qt 5.5 |
Instantiated By: | MouseEvent |
This class was introduced in Qt 5.5.
Public Types
enum | Buttons { LeftButton, RightButton, MiddleButton, BackButton, NoButton } |
Public Functions
Qt3DInput::QMouseEvent::Buttons | button() const |
int | buttons() const |
bool | isAccepted() const |
int | modifiers() const |
void | setAccepted(bool accepted) |
QEvent::Type | type() const |
int | x() const |
int | y() const |
Related Non-Members
typedef | QMouseEventPtr |
Detailed Description
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.
Member Type Documentation
enum QMouseEvent::Buttons
Constant | Value |
---|---|
Qt3DInput::QMouseEvent::LeftButton | Qt::LeftButton |
Qt3DInput::QMouseEvent::RightButton | Qt::RightButton |
Qt3DInput::QMouseEvent::MiddleButton | Qt::MiddleButton |
Qt3DInput::QMouseEvent::BackButton | 5 |
Qt3DInput::QMouseEvent::NoButton | Qt::NoButton |
Member Function Documentation
Qt3DInput::QMouseEvent::Buttons QMouseEvent::button() const
Returns the mouse button of the mouse event.
int QMouseEvent::buttons() const
Returns a bitfield to be used to check for mouse buttons that may be accompanying the mouse event.
bool QMouseEvent::isAccepted() const
Returns whether the event was accepted.
int QMouseEvent::modifiers() const
Returns the keyboard modifiers that may be accompanying the mouse event.
void QMouseEvent::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.
See also isAccepted().
QEvent::Type QMouseEvent::type() const
Returns the QEvent::Type of the event.
int QMouseEvent::x() const
Returns the x position of the mouse event.
int QMouseEvent::y() const
Returns the y position of the mouse event.