- Qt 6.10
- Qt GUI
- C++ Classes
- QTabletEvent
- Qt 6.10.0 Reference Documentation

# Obsolete Members for QTabletEvent

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

## Public Functions

`(deprecated in 6.0)` QPoint | globalPos() const
`(deprecated in 6.0)` const QPointF | globalPosF() const
`(deprecated in 6.0)` int | globalX() const
`(deprecated in 6.0)` int | globalY() const
`(deprecated in 6.0)` QPoint | pos() const
`(deprecated in 6.0)` const QPointF | posF() const
`(deprecated in 6.0)` qint64 | uniqueId() const
`(deprecated in 6.0)` int | x() const
`(deprecated in 6.0)` int | y() const

## Member Function Documentation

### `[deprecated in 6.0]` QPoint QTabletEvent::globalPos() const

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

Use globalPosition().toPoint() instead.

Returns the global position of the device at the time of the event. This is important on asynchronous windows systems like X11; whenever you move your widgets around in response to mouse events, globalPos() can differ significantly from the current position QCursor::pos().

See also globalX() and globalY().

### `[deprecated in 6.0]` const QPointF QTabletEvent::globalPosF() const

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

Use globalPosition() instead. Returns the global position of the device at the time of the event. This is important on asynchronous windows systems like X11; whenever you move your widgets around in response to mouse events, globalPosF() can differ significantly from the current position QCursor::pos().

See also posF().

### `[deprecated in 6.0]` int QTabletEvent::globalX() const

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

Use globalPosition().x() instead.

Returns the global x position of the mouse pointer at the time of the event.

See also globalY() and globalPos().

### `[deprecated in 6.0]` int QTabletEvent::globalY() const

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

Use globalPosition().y() instead.

Returns the global y position of the tablet device at the time of the event.

See also globalX() and globalPos().

### `[deprecated in 6.0]` QPoint QTabletEvent::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 device, relative to the widget that received the event.

If you move widgets around in response to mouse events, use globalPos() instead of this function.

See also x(), y(), and globalPos().

### `[deprecated in 6.0]` const QPointF QTabletEvent::posF() 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 device, relative to the widget that received the event.

If you move widgets around in response to mouse events, use globalPosF() instead of this function.

See also globalPosF().

### `[deprecated in 6.0]` qint64 QTabletEvent::uniqueId() const

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

Use pointingDevice().uniqueId() instead.

Returns a unique ID for the current device, making it possible to differentiate between multiple devices being used at the same time on the tablet.

Support of this feature is dependent on the tablet.

Values for the same device may vary from OS to OS.

Later versions of the Wacom driver for Linux will now report the ID information. If you have a tablet that supports unique ID and are not getting the information on Linux, consider upgrading your driver.

As of Qt 4.2, the unique ID is the same regardless of the orientation of the pen. Earlier versions would report a different value when using the eraser-end versus the pen-end of the stylus on some OS's.

See also pointerType().

### `[deprecated in 6.0]` int QTabletEvent::x() const

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

Use position().x() instead.

Returns the x position of the device, relative to the widget that received the event.

See also y() and pos().

### `[deprecated in 6.0]` int QTabletEvent::y() const

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

Use position().y() instead.

Returns the y position of the device, relative to the widget that received the event.

See also x() and pos().