AmbientLightReading QML Type

The AmbientLightReading element holds the most AmbientLightSensor reading. 更多...

import 語句: import QtSensors 5.0
Since: QtSensors 5.0
繼承: SensorReading

特性

詳細描述

The AmbientLightReading element holds the most AmbientLightSensor reading.

此元素包裹 QAmbientLightReading 類。請參閱文檔編製 QAmbientLightReading 瞭解細節。

This element cannot be directly created.

特性文檔編製

lightLevel : LightLevel

This property holds the ambient light level.

Please see QAmbientLightReading::lightLevel for information about this property.

Note that LightLevel constants are exposed through the AmbientLightReading 類。


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