Nesta página

AmbientLightReading QML Type

O elemento `AmbientLightReading` é o mais AmbientLightSensor leitura. Mais...

Import Statement: import QtSensors
Since: QtSensors 5.0
Inherits:

SensorReading

Propriedades

Descrição detalhada

O elemento `AmbientLightReading` contém a leitura mais recente de ` AmbientLightSensor `.

Este elemento envolve a classe ` QAmbientLightReading `. Consulte a documentação em QAmbientLightReading para obter mais detalhes.

Este elemento não pode ser criado diretamente.

Documentação das propriedades

lightLevel : LightLevel

Essa propriedade mantém o nível de luz ambiente.

Consulte QAmbientLightReading::lightLevel para obter informações sobre esta propriedade.

Observe que as constantes LightLevel são disponibilizadas por meio da classe AmbientLightReading.

AmbientLightSensor {
    onReadingChanged: {
        if (reading.lightLevel == AmbientLightReading.Dark)
            // do something
    }
}

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