在本页

MouseHandler QML Type

提供鼠标事件通知。更多

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

属性

信号

详细说明

另请参见 MouseDeviceMouseEvent

属性文档

containsMouse : bool [read-only]

如果 QMouseHandler 当前包含鼠标,则保持true

sourceDevice : MouseDevice

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

信号文档

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.