Nesta página

QAmbientLightSensor Class

A classe QAmbientLightSensor é um wrapper de conveniência para a classe QSensor. Mais...

Cabeçalho: #include <QAmbientLightSensor>
CMake: find_package(Qt6 REQUIRED COMPONENTS Sensors)
target_link_libraries(mytarget PRIVATE Qt6::Sensors)
qmake: QT += sensors
Herdado de: QSensor

Funções públicas

QAmbientLightSensor(QObject *parent = nullptr)
virtual ~QAmbientLightSensor()
QAmbientLightReading *reading() const

Descrição detalhada

A única diferença comportamental é que esta classe define o tipo corretamente.

Essa classe também possui uma função ` reading()` que retorna um ` QAmbientLightReading ` em vez de um ` QSensorReading`.

Para obter detalhes sobre como o sensor funciona, consulte QAmbientLightReading.

Consulte também QAmbientLightReading.

Documentação da função de membro

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

Crie o sensor como um elemento filho de parent.

[virtual noexcept] QAmbientLightSensor::~QAmbientLightSensor()

Destrua o sensor. Interrompe o sensor, caso ele ainda não tenha sido interrompido.

QAmbientLightReading *QAmbientLightSensor::reading() const

Retorna a classe de leitura deste sensor.

Veja também QSensor::reading().

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