QPointingDeviceUniqueId Class
QPointingDeviceUniqueId identifies a unique object, such as a tagged token or stylus, which is used with a pointing device. More...
| Header: | #include <QPointingDeviceUniqueId> |
| qmake: | QT += gui |
| Since: | Qt 5.8 |
Properties
- numericId : const qint64
Detailed Description
QPointingDeviceUniqueId identifies a unique object, such as a tagged token or stylus, which is used with a pointing device.
QPointingDeviceUniqueIds can be compared for equality, and can be used as keys in a QHash. You get access to the numerical ID via numericId(), if the device supports such IDs. For future extensions, though, you should not use that function, but compare objects of this type using the equality operator.
This class is a thin wrapper around an integer ID. You pass it into and out of functions by value.
This type actively prevents you from holding it in a QList, because doing so would be very inefficient. Use a QVector instead, which has the same API as QList, but more efficient storage.
See also QTouchEvent::TouchPoint.
Property Documentation
numericId : const qint64
This property holds the numeric unique ID of the token represented by a touchpoint
If the device provides a numeric ID, isValid() returns true, and this property provides the numeric ID; otherwise it is -1.
You should not use the value of this property in portable code, but instead rely on equality to identify pointers.
See also isValid().