Obsolete Members for QWheelEvent

QWheelEvent 的以下成员已被弃用。提供这些成员是为了保持旧源代码的正常运行。我们强烈建议不要在新代码中使用它们。

公共函数

(deprecated in 6.0) Qt::MouseEventSource source() const

成员函数文档

[deprecated in 6.0] Qt::MouseEventSource QWheelEvent::source() const

自 6.0 版起,该函数已被弃用。我们强烈建议不要在新代码中使用该函数。

请使用pointingDevice() 代替。

返回有关滚轮事件源的信息。

该来源可用于区分来自带物理滚轮的鼠标的事件和由其他方式(如触摸板上的轻移手势)产生的事件。这个枚举会告诉你事件是从哪里合成的;但通常知道事件是从哪个设备合成的更有用,所以请尽量使用pointingDevice() 代替。

注意: 许多平台不提供此类信息。在此类平台上,Qt::MouseEventNotSynthesized 将始终返回。

另请参阅 Qt::MouseEventSource

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