이 페이지에서

QRotationSensor Class

QRotationSensor 클래스는 QSensor 을 감싸는 편리한 래퍼입니다. 더 보기...

헤더: #include <QRotationSensor>
CMake: find_package(Qt6 REQUIRED COMPONENTS Sensors)
target_link_libraries(mytarget PRIVATE Qt6::Sensors)
qmake: QT += sensors
상속: QSensor

속성

공개 함수

QRotationSensor(QObject *parent = nullptr)
virtual ~QRotationSensor()
bool hasZ() const
QRotationReading *reading() const
void setHasZ(bool hasZ)

신호

void hasZChanged(bool hasZ)

상세 설명

유일한 동작상의 차이는 이 클래스가 유형을 올바르게 설정한다는 점입니다.

또한 이 클래스에는 QSensorReading 대신 QRotationReading 를 반환하는 reading() 함수가 있습니다.

센서의 작동 방식에 대한 자세한 내용은 QRotationReading 를 참조하십시오.

QRotationReading도 참조하십시오 .

속성 설명서

[read-only] hasZ : bool

이 속성은 z 각도를 사용할 수 있는지 여부를 나타내는 값을 저장합니다.

z가 사용 가능한 경우 true를 반환합니다. z가 사용 불가능한 경우 false를 반환합니다.

액세스 함수:

bool hasZ() const

알림 신호:

void hasZChanged(bool hasZ)

멤버 함수 설명서

[explicit] QRotationSensor::QRotationSensor(QObject *parent = nullptr)

parent 의 자식으로 센서를 생성하십시오.

[virtual noexcept] QRotationSensor::~QRotationSensor()

센서를 파괴합니다. 센서가 아직 중지되지 않은 경우 중지시킵니다.

QRotationReading *QRotationSensor::reading() const

이 센서의 판독 클래스를 반환합니다.

QSensor::reading()도 참조하십시오 .

void QRotationSensor::setHasZ(bool hasZ)

hasZ 에서 z 각도를 사용할 수 있는지 여부를 설정합니다. 이 메서드는 백엔드에서 호출해야 합니다. 기본적으로 hasZ 속성은 true이므로, 백엔드는 회전 센서가 z 각도를 보고할 수 없는 경우에만 이 메서드를 호출하면 됩니다.

hasZ()도 참조하십시오 .

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