QPointingDeviceUniqueId¶
QPointingDeviceUniqueId
identifies a unique object, such as a tagged token or stylus, which is used with a pointing device. More…
Synopsis¶
Functions¶
Static functions¶
def
fromNumericId
(id)
Detailed Description¶
QPointingDeviceUniqueIds can be compared for equality, and can be used as keys in a
QHash
. You get access to the numerical ID vianumericId()
, 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 aQVector
instead, which has the same API asQList
, but more efficient storage.See also
TouchPoint
- class PySide2.QtGui.QPointingDeviceUniqueId¶
PySide2.QtGui.QPointingDeviceUniqueId(QPointingDeviceUniqueId)
- param QPointingDeviceUniqueId:
Constructs an invalid unique pointer ID.
- static PySide2.QtGui.QPointingDeviceUniqueId.fromNumericId(id)¶
- Parameters:
id – int
- Return type:
Constructs a unique pointer ID from numeric ID
id
.
- PySide2.QtGui.QPointingDeviceUniqueId.isValid()¶
- Return type:
bool
Returns whether this unique pointer ID is valid, that is, it represents an actual pointer.
- PySide2.QtGui.QPointingDeviceUniqueId.numericId()¶
- Return type:
int
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
- PySide2.QtGui.QPointingDeviceUniqueId.__ne__(rhs)¶
- Parameters:
- Return type:
bool
- PySide2.QtGui.QPointingDeviceUniqueId.__eq__(rhs)¶
- Parameters:
- Return type:
bool
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.