이 페이지에서

QLightSensor Class

QLightSensor 클래스는 QSensor 을 감싸는 편의 래퍼입니다. 더 보기...

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

속성

공개 함수

QLightSensor(QObject *parent = nullptr)
virtual ~QLightSensor()
qreal fieldOfView() const
QLightReading *reading() const
void setFieldOfView(qreal fieldOfView)

신호

void fieldOfViewChanged(qreal fieldOfView)

상세 설명

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

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

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

QLightReading도 참조하십시오 .

속성 설명서

[read-only] fieldOfView : qreal

이 속성은 시야각을 나타내는 값을 포함합니다.

이는 센서의 시야각을 나타내는 각도입니다.

모든 광 센서가 시야각 정보를 가져오는 기능을 지원하는 것은 아닙니다. 이 속성을 지원하지 않는 센서의 경우 값은 0이 됩니다. 시야각 지원 여부는 ` QSensor::isFeatureSupported()` 함수와 ` QSensor::FieldOfView ` 플래그를 사용하여 확인할 수 있습니다.

액세스 함수:

qreal fieldOfView() const

알림 신호:

void fieldOfViewChanged(qreal fieldOfView)

멤버 함수 문서

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

parent 의 자식 노드로 센서를 생성합니다.

[virtual noexcept] QLightSensor::~QLightSensor()

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

QLightReading *QLightSensor::reading() const

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

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

void QLightSensor::setFieldOfView(qreal fieldOfView)

시야각을 fieldOfView 로 설정합니다. 이 함수는 백엔드에서 호출되어야 합니다.

fieldOfView()도 참조하십시오 .

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