The QAmbientLightSensor class is a convenience wrapper around QSensor . 更多...
头: | #include <QAmbientLightSensor> |
CMake: |
find_package(Qt6 COMPONENTS Sensors REQUIRED)
target_link_libraries(mytarget PRIVATE Qt6::Sensors) |
qmake: | QT += sensors |
Since: | Qt 5.1 |
继承: | QSensor |
QAmbientLightSensor (QObject * parent = nullptr) | |
virtual | ~QAmbientLightSensor () |
QAmbientLightReading * | reading () const |
唯一行为差异是此类正确设置类型。
此类还特征 reading () 函数返回 QAmbientLightReading 而不是 QSensorReading .
有关传感器如何工作的细节,见 QAmbientLightReading .
另请参阅 QAmbientLightReading .
构造传感器作为子级对于 parent .
[虚拟]
QAmbientLightSensor::
~QAmbientLightSensor
()
销毁传感器。停止传感器若尚未停止。
返回用于此传感器的读取类。
另请参阅 QSensor::reading ().