Obsolete Members for QNativeGestureEvent
类QNativeGestureEvent 的以下成员已被弃用。提供这些成员是为了保持旧源代码的正常运行。我们强烈建议不要在新代码中使用它们。
公共函数
(deprecated in 6.2) | QNativeGestureEvent(Qt::NativeGestureType type, const QPointingDevice *device, const QPointF &localPos, const QPointF &scenePos, const QPointF &globalPos, qreal realValue, quint64 sequenceId, quint64 intValue) |
(deprecated in 6.0) const QPoint | globalPos() const |
(deprecated in 6.0) QPointF | localPos() const |
(deprecated in 6.0) const QPoint | pos() const |
(deprecated in 6.0) QPointF | screenPos() const |
(deprecated in 6.0) QPointF | windowPos() const |
成员函数文档
[deprecated in 6.2]
QNativeGestureEvent::QNativeGestureEvent(Qt::NativeGestureType type, const QPointingDevice *device, const QPointF &localPos, const QPointF &scenePos, const QPointF &globalPos, qreal realValue, quint64 sequenceId, quint64 intValue)
自 6.2 版起,该函数已被弃用。我们强烈建议不要在新代码中使用该函数。
请使用其他构造函数,因为intValue 不再单独存储。
构造一个type 类型的本地手势事件,源于device 。
localPos 、scenePos 和globalPos 分别指定手势相对于接收部件或项目、窗口、屏幕或桌面的位置。
realValue 是 macOS 事件参数, 和 是 Windows 事件参数。sequenceId intValue
注意: 不可能同时存储 realValue 和intValue :其中一个必须为 0。如果realValue == 0 且intValue!= 0,则将其存储在同一变量中,这样value() 将返回作为intValue 给出的值。
[deprecated in 6.0]
const QPoint QNativeGestureEvent::globalPos() const
自 6.0 版起,该函数已被弃用。我们强烈建议不要在新代码中使用该函数。
请使用globalPosition().toPoint() 代替它。
以屏幕坐标形式返回手势的位置QPointF
[deprecated in 6.0]
QPointF QNativeGestureEvent::localPos() const
自 6.0 版起,该函数已被弃用。我们强烈建议不要在新代码中使用该函数。
请使用position() 代替。
返回手势的位置(QPointF ),相对于接收事件的部件或项目。
[deprecated in 6.0]
const QPoint QNativeGestureEvent::pos() const
自 6.0 版起,该函数已被弃用。我们强烈建议不要在新代码中使用该函数。
请使用position().toPoint() 代替它。
返回鼠标光标相对于接收事件的部件或项目的位置。
[deprecated in 6.0]
QPointF QNativeGestureEvent::screenPos() const
自 6.0 版起,该函数已被弃用。我们强烈建议不要在新代码中使用该函数。
请使用globalPosition() 代替。
以QPointF 的屏幕坐标形式返回手势的位置。
[deprecated in 6.0]
QPointF QNativeGestureEvent::windowPos() const
自 6.0 版起,该函数已被弃用。我们强烈建议不要在新代码中使用该函数。
请使用scenePosition() 代替。
以QPointF 的形式返回相对于接收事件的窗口的手势位置。
© 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.