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 )

This function is deprecated since 6.2. We strongly advise against using it in new code.

Use the other constructor, because intValue is no longer stored separately.

构造本机手势事件为类型 type originating from device .

localPos , scenePos and globalPos specify the gesture position relative to the receiving widget or item, window, and screen or desktop, respectively.

realValue 是 macOS 事件参数, sequenceId and intValue 是 Windows 事件参数。

注意: It's not possible to store realValue and intValue simultaneously: one or the other must be zero. If realValue == 0 and intValue != 0, it is stored in the same variable, such that value () returns the value given as intValue .

[deprecated in 6.0] const QPoint QNativeGestureEvent:: globalPos () const

This function is deprecated since 6.0. We strongly advise against using it in new code.

使用 globalPosition ().toPoint() instead.

返回手势位置按 QPointF 按屏幕坐标

[deprecated in 6.0] QPointF QNativeGestureEvent:: localPos () const

This function is deprecated since 6.0. We strongly advise against using it in new code.

使用 position () 代替。

返回手势位置按 QPointF ,相对于接收事件的 Widget 或项。

[deprecated in 6.0] const QPoint QNativeGestureEvent:: pos () const

This function is deprecated since 6.0. We strongly advise against using it in new code.

使用 position ().toPoint() instead.

返回鼠标光标的位置,相对于接收事件的 Widget 或项。

[deprecated in 6.0] QPointF QNativeGestureEvent:: screenPos () const

This function is deprecated since 6.0. We strongly advise against using it in new code.

使用 globalPosition () 代替。

返回手势位置按 QPointF 按屏幕坐标。

[deprecated in 6.0] QPointF QNativeGestureEvent:: windowPos () const

This function is deprecated since 6.0. We strongly advise against using it in new code.

使用 scenePosition () 代替。

返回手势位置按 QPointF ,相对接收事件的窗口。