The Qt3DCore::QMouseEvent contains parameters that describe a mouse event. 更多...
| 头: | #include <Qt3DInput/QMouseEvent> | 
| qmake: | QT += 3dinput | 
| Since: | Qt 5.5 | 
| 实例化: | MouseEvent | 
| 继承: | QObject | 
该类在 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.
另请参阅 QKeyEvent , QWheelEvent ,和 QMouseHandler .
| 常量 | 值 | 
|---|---|
								
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
								
							 | 
						
| 常量 | 值 | 
|---|---|
								
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
								
							 | 
						
指定若鼠标事件已被接受
访问函数:
| bool | isAccepted () const | 
| void | setAccepted (bool accepted ) | 
指定触发鼠标事件的按钮
访问函数:
| Qt3DInput::QMouseEvent::Buttons | button () const | 
指定触发鼠标事件的按钮
访问函数:
| int | buttons () const | 
Specifies if any modifiers were applied to the mouse event
访问函数:
| Qt3DInput::QMouseEvent::Modifiers | modifiers () const | 
Specifies if a mouse button was held down during the mouse event
访问函数:
| bool | wasHeld () const | 
Specifies The X coordinate of the mouse event
访问函数:
| int | x () const | 
Specifies The y coordinate of the mouse event
访问函数:
| int | y () const | 
Constructs a new QMouseEvent instance for the QMouseEvent e .
Returns the mouse button of the mouse event.
注意: Getter function for property button.
Returns a bitfield to be used to check for mouse buttons that may be accompanying the mouse event.
注意: Getter function for property buttons.
Returns whether the event was accepted.
注意: getter 函数对于特性 accepted .
Returns the keyboard modifiers that may be accompanying the mouse event.
注意: Getter function for property modifiers.
Sets the event as accepted if accepted 为 true。
注意: When an event is accepted, it will prevent further propagation to other listeners.
注意: setter 函数对于特性 accepted .
另请参阅 isAccepted ().
返回 QEvent::Type of the event.
Returns the x position of the mouse event.
注意: Getter function for property x.
Returns the y position of the mouse event.
注意: Getter function for property y.
共享指针为 QMouseEvent .