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 事件参数,sequenceId 和intValue 是 Windows 事件参数。
注意:无法 同时存储 realValue 和intValue :二者必有一方为零。如果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 表示,该位置相对于接收该事件的窗口。
© 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.