本页内容

MouseHandler QML Type

提供鼠标事件通知。更多...

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

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

属性

信号

详细说明

另请参阅 MouseDevice 和MouseEvent 。

属性文档

containsMouse : bool [read-only]

如果 QMouseHandler 当前持有鼠标,则返回true 。

sourceDevice : MouseDevice

保存MouseHandler 实例的当前鼠标源设备。

Signal 文档

clicked(MouseEvent mouse)

当鼠标按钮被点击时,会触发此信号,其事件详细信息包含在mouse

注意: 相应的处理程序 为onClicked 。

doubleClicked(MouseEvent mouse)

当鼠标按钮被双击时会触发此信号,事件详情包含在mouse

注意: 相应的处理程序 为onDoubleClicked 。

entered()

注: 相应的处理程序 是onEntered 。

exited()

注: 相应的处理程序 是onExited 。

positionChanged(MouseEvent mouse)

当鼠标位置发生变化时会触发此信号,事件详情包含在mouse

注意: 相应的处理程序 为onPositionChanged 。

pressAndHold(MouseEvent mouse)

当鼠标按钮被按下并保持按下状态时,会触发此信号,事件详情包含在mouse

注意: 相应的处理程序 为onPressAndHold 。

pressed(MouseEvent mouse)

当鼠标按钮被按下时会触发此信号,事件详情包含在mouse

注意: 相应的处理程序 为onPressed 。

released(MouseEvent mouse)

当鼠标按钮被释放时会触发此信号,事件详情包含在mouse

注意: 相应的处理程序 是onReleased 。

wheel(MouseEvent mouse)

当使用鼠标滚轮时会触发此信号,事件详情包含在mouse 中。

注意: 相应的处理程序 为onWheel 。

© 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.