Qt3DInput.QMouseEvent¶
The Qt3DCore::QMouseEvent contains parameters that describe a mouse event. More…

Synopsis¶
Functions¶
def
button
()def
buttons
()def
isAccepted
()def
modifiers
()def
setAccepted
(accepted)def
type
()def
wasHeld
()def
x
()def
y
()
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
QMouseHandler
-
PySide2.Qt3DInput.Qt3DInput.QMouseEvent.
Buttons
¶ Constant
Description
Qt3DInput.QMouseEvent.LeftButton
Qt3DInput.QMouseEvent.RightButton
Qt3DInput.QMouseEvent.MiddleButton
Qt3DInput.QMouseEvent.BackButton
Qt3DInput.QMouseEvent.NoButton
-
PySide2.Qt3DInput.Qt3DInput.QMouseEvent.
Modifiers
¶ Constant
Description
Qt3DInput.QMouseEvent.NoModifier
Qt3DInput.QMouseEvent.ShiftModifier
Qt3DInput.QMouseEvent.ControlModifier
Qt3DInput.QMouseEvent.AltModifier
Qt3DInput.QMouseEvent.MetaModifier
Qt3DInput.QMouseEvent.KeypadModifier
- Return type
Returns the mouse button of the mouse event.
- Return type
int
Returns a bitfield to be used to check for mouse buttons that may be accompanying the mouse event.
-
PySide2.Qt3DInput.Qt3DInput.QMouseEvent.
isAccepted
()¶ - Return type
bool
Returns whether the event was accepted.
-
PySide2.Qt3DInput.Qt3DInput.QMouseEvent.
modifiers
()¶ - Return type
Returns the keyboard modifiers that may be accompanying the mouse event.
-
PySide2.Qt3DInput.Qt3DInput.QMouseEvent.
setAccepted
(accepted)¶ - Parameters
accepted –
bool
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()
-
PySide2.Qt3DInput.Qt3DInput.QMouseEvent.
type
()¶ - Return type
Type
Returns the
Type
of the event.
-
PySide2.Qt3DInput.Qt3DInput.QMouseEvent.
wasHeld
()¶ - Return type
bool
-
PySide2.Qt3DInput.Qt3DInput.QMouseEvent.
x
()¶ - Return type
int
Returns the x position of the mouse event.
-
PySide2.Qt3DInput.Qt3DInput.QMouseEvent.
y
()¶ - Return type
int
Returns the y position of the mouse event.