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()는 참을 반환하고 이 속성은 숫자 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 lhsrhs 가 서로 다른 포인터(true)를 식별하는지(false) 여부를 반환합니다.

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

두 개의 고유 포인터 ID lhsrhs 가 동일한 포인터(true)를 식별하는지 여부(false)를 반환합니다.

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