- Qt 5.15
- Qt Quick
- QML Types
- EventTouchPoint QML Type
- Qt 5.15.18 Reference Documentation

# EventTouchPoint QML Type

Provides information about an individual touch point within a PointerEvent. More...

Import Statement: | import QtQuick 2.15

- List of all members, including inherited members

## Properties

- ellipseDiameters : size
- pressure : qreal
- rotation : qreal
- uniqueId : QPointerUniqueId

## Detailed Description

See also PointerEvent and PointerHandler.

## Property Documentation

[read-only] ellipseDiameters : size

This property holds the diameters of the contact patch, if the event comes from a touchpoint and the device provides this information.

A touchpoint is modeled as an elliptical area where the finger is pressed against the touchscreen. (In fact, it could also be modeled as a bitmap; but in that case we expect an elliptical bounding estimate to be fitted to the contact patch before the event is sent.) The harder the user presses, the larger the contact patch; so, these diameters provide an alternate way of detecting pressure, in case the device does not include a separate pressure sensor. The ellipse is centered on scenePosition (position in the PointerHandler's Item's local coordinates). The rotation property provides the rotation of the ellipse, if known. It is expected that if the rotation is zero, the verticalDiameter of the ellipse is the larger one (the major axis), because of the usual hand position, reaching upward or outward across the surface.

If the contact patch is unknown, or the device is not a touchscreen, these values will be zero.

[read-only] pressure : qreal

This property tells how hard the user is pressing the stylus on a graphics tablet or the finger against a touchscreen, in the range from `0` (no measurable pressure) to `1.0` (maximum pressure which the device can measure).

It is valid only with certain tablets and touchscreens that can measure pressure. Otherwise, it will be `1.0` when pressed.

[read-only] rotation : qreal

This property holds the rotation angle of the stylus on a graphics tablet or the contact patch of a touchpoint on a touchscreen.

It is valid only with certain tablet stylus devices and touchscreens that can measure the rotation angle. Otherwise, it will be zero.

[read-only] uniqueId : QPointerUniqueId

This property holds the unique ID of the fiducial or stylus in use, if any.

On touchscreens that can track physical objects (such as knobs or game pieces) in addition to fingers, each object usually has a unique ID. Likewise, each stylus that can be used with a graphics tablet usually has a unique serial number. Qt so far only supports numeric IDs. You can get the actual number as uniqueId.numeric, but that is a device-specific detail. In the future, there may be support for non-numeric IDs, so you should not assume that the number is meaningful.

If you need to identify specific objects, your application should provide UI for registering objects and mapping them to functionality: allow the user to select a meaning, virtual tool, or action, prompt the user to bring the object into proximity, and store a mapping from uniqueId to its purpose, for example in Settings.