- Qt 6.6
- Qt GUI
- C++ Classes
- QNativeGestureEvent
- Qt 6.6.0 Reference Documentation

# Obsolete Members for QNativeGestureEvent

The following members of class QNativeGestureEvent are deprecated. They are provided to keep old source code working. We strongly advise against using them in new code.

## Public Functions

`(deprecated (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 (6.0))` const QPoint | globalPos() const
`(deprecated (6.0))` QPointF | localPos() const
`(deprecated (6.0))` const QPoint | pos() const
`(deprecated (6.0))` QPointF | screenPos() const
`(deprecated (6.0))` QPointF | windowPos() const

## Member Function Documentation

### 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.

Constructs a native gesture event of type type originating from device.

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

realValue is the macOS event parameter, sequenceId and intValue are the Windows event parameters.

Note: 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.

### const QPoint QNativeGestureEvent::globalPos() const

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

Use globalPosition().toPoint() instead.

Returns the position of the gesture as a QPointF in screen coordinates

### QPointF QNativeGestureEvent::localPos() const

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

Use position() instead.

Returns the position of the gesture as a QPointF, relative to the widget or item that received the event.

### const QPoint QNativeGestureEvent::pos() const

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

Use position().toPoint() instead.

Returns the position of the mouse cursor, relative to the widget or item that received the event.

### QPointF QNativeGestureEvent::screenPos() const

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

Use globalPosition() instead.

Returns the position of the gesture as a QPointF in screen coordinates.

### QPointF QNativeGestureEvent::windowPos() const

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

Use scenePosition() instead.

Returns the position of the gesture as a QPointF, relative to the window that received the event.