本页内容

MouseEvent QML Type

提供描述鼠标事件的参数。更多内容...

Import Statement: import Qt3D.Input 2.12
In C++: QMouseEvent
Status: Deprecated

此类型已弃用。我们强烈建议不要在新代码中使用它。

属性

详细说明

当鼠标按钮被按下,且从鼠标位置出发、穿过视图的光线与场景中的一个或多个元素发生相交时,就会触发鼠标事件。

另请参阅 KeyEvent 、WheelEvent 和MouseHandler 。

属性文档

accepted : bool

指定鼠标事件是否已被接受

button : Buttons [read-only]

指定触发鼠标事件的按钮

buttons : int [read-only]

指定触发鼠标事件的按钮

modifiers : Modifiers [read-only]

指定是否对鼠标事件应用了任何修饰符

wasHeld : bool [read-only]

指定在鼠标事件发生时鼠标按钮是否被按住

x : int [read-only]

指定鼠标事件的 X 坐标

y : int [read-only]

指定鼠标事件的 Y 坐标

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.