이 페이지에서

QPointingDeviceUniqueId Class

QPointingDeviceUniqueId는 포인팅 장치와 함께 사용되는 태그가 부착된 토큰이나 스타일러스와 같은 고유한 개체를 식별합니다. 더 보기...

헤더: #include <QPointingDeviceUniqueId>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui

속성

공용 함수

QPointingDeviceUniqueId()
bool isValid() const
qint64 numericId() const

정적 공용 멤버

QPointingDeviceUniqueId fromNumericId(qint64 id)
size_t qHash(QPointingDeviceUniqueId key, size_t seed = 0)
bool operator!=(QPointingDeviceUniqueId lhs, QPointingDeviceUniqueId rhs)
bool operator==(QPointingDeviceUniqueId lhs, QPointingDeviceUniqueId rhs)

상세 설명

QPointingDeviceUniqueIds는 동일성 비교가 가능하며, QHash 에서 키로 사용할 수 있습니다. 장치가 해당 ID를 지원하는 경우, numericId()를 통해 숫자형 ID에 접근할 수 있습니다. 그러나 향후 확장을 고려할 때, 해당 함수를 사용해서는 안 되며, 대신 등호 연산자를 사용하여 이 유형의 객체들을 비교해야 합니다.

이 클래스는 정수 ID를 감싸는 얇은 래퍼입니다. 함수 내로 전달하거나 함수에서 반환할 때는 값으로 전달합니다.

QEventPoint도 참조하십시오 .

속성 문서

[read-only] numericId : const qint64

이 속성은 터치포인트가 나타내는 토큰의 고유한 숫자 ID를 저장합니다.

기기가 숫자형 ID를 제공하는 경우, ` isValid()`는 `true`를 반환하며, 이 속성은 해당 숫자형 ID를 제공합니다. 그렇지 않은 경우 값은 `-1`입니다.

이 속성의 값을 이식 가능한 코드에서 사용해서는 안 되며, 대신 포인터를 식별할 때는 등가 연산을 사용해야 합니다.

액세스 함수:

qint64 numericId() const

isValid()도 참조하십시오 .

멤버 함수 문서

[constexpr noexcept] QPointingDeviceUniqueId::QPointingDeviceUniqueId()

유효하지 않은 고유 포인터 ID를 생성합니다.

[static] QPointingDeviceUniqueId QPointingDeviceUniqueId::fromNumericId(qint64 id)

숫자 ID id 를 기반으로 고유한 포인터 ID를 생성합니다.

[constexpr noexcept] bool QPointingDeviceUniqueId::isValid() const

이 고유 포인터 ID가 유효한지, 즉 실제 포인터를 나타내는지 여부를 반환합니다.

관련 비회원

[noexcept] size_t qHash(QPointingDeviceUniqueId key, size_t seed = 0)

seed 를 계산의 시드로 사용하여 key 에 대한 해시 값을 반환합니다.

[noexcept] bool operator!=(QPointingDeviceUniqueId lhs, QPointingDeviceUniqueId rhs)

두 개의 고유한 포인터 ID인 lhs 와 rhs 가 서로 다른 포인터(true)를 가리키는지 여부(false)를 반환합니다.

[noexcept] bool operator==(QPointingDeviceUniqueId lhs, QPointingDeviceUniqueId rhs)

두 개의 고유한 포인터 ID lhs 와 rhs 가 동일한 포인터(true)를 가리키는지(false) 여부를 반환합니다.

© 2026 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.