内容表

上一话题

Qt3DInput.QMouseDevice

下一话题

Qt3DInput.QMouseHandler

Qt3DInput.QMouseEvent

The Qt3DCore::QMouseEvent contains parameters that describe a mouse event. 更多

Inheritance diagram of PySide2.Qt3DInput.Qt3DInput.QMouseEvent

概要

函数

详细描述

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

PySide2.Qt3DInput.Qt3DInput.QMouseEvent. Buttons

常量

描述

Qt3DInput.QMouseEvent.LeftButton

Qt3DInput.QMouseEvent.RightButton

Qt3DInput.QMouseEvent.MiddleButton

Qt3DInput.QMouseEvent.BackButton

Qt3DInput.QMouseEvent.NoButton

PySide2.Qt3DInput.Qt3DInput.QMouseEvent. Modifiers

常量

描述

Qt3DInput.QMouseEvent.NoModifier

Qt3DInput.QMouseEvent.ShiftModifier

Qt3DInput.QMouseEvent.ControlModifier

Qt3DInput.QMouseEvent.AltModifier

Qt3DInput.QMouseEvent.MetaModifier

Qt3DInput.QMouseEvent.KeypadModifier

PySide2.Qt3DInput.Qt3DInput.QMouseEvent. button ( )
返回类型

Buttons

Returns the mouse button of the mouse event.

PySide2.Qt3DInput.Qt3DInput.QMouseEvent. buttons ( )
返回类型

int

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

PySide2.Qt3DInput.Qt3DInput.QMouseEvent. isAccepted ( )
返回类型

bool

Returns whether the event was accepted.

PySide2.Qt3DInput.Qt3DInput.QMouseEvent. modifiers ( )
返回类型

Modifiers

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

PySide2.Qt3DInput.Qt3DInput.QMouseEvent. setAccepted ( accepted )
参数

accepted bool

Sets the event as accepted if accepted 为 true。

注意

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

另请参阅

isAccepted()

PySide2.Qt3DInput.Qt3DInput.QMouseEvent. type ( )
返回类型

Type

返回 Type of the event.

PySide2.Qt3DInput.Qt3DInput.QMouseEvent. wasHeld ( )
返回类型

bool

PySide2.Qt3DInput.Qt3DInput.QMouseEvent. x ( )
返回类型

int

Returns the x position of the mouse event.

PySide2.Qt3DInput.Qt3DInput.QMouseEvent. y ( )
返回类型

int

Returns the y position of the mouse event.