QAmbientTemperatureSensor 类

QAmbientTemperatureSensor 类是方便包裹器围绕 QSensor . 更多...

头: #include <QAmbientTemperatureSensor>
CMake: find_package(Qt6 REQUIRED COMPONENTS Sensors)
target_link_libraries(mytarget PRIVATE Qt6::Sensors)
qmake: QT += sensors
继承: QSensor

公共函数

QAmbientTemperatureSensor (QObject * parent = nullptr)
virtual ~QAmbientTemperatureSensor ()
QAmbientTemperatureReading * reading () const

详细描述

唯一行为差异是此类正确设置类型。

此类还特征 reading () 函数返回 QAmbientTemperatureReading 而不是 QSensorReading .

有关传感器如何工作的细节,见 QAmbientTemperatureReading .

另请参阅 QAmbientTemperatureReading .

成员函数文档编制

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

构造传感器作为子级对于 parent .

[virtual noexcept] QAmbientTemperatureSensor:: ~QAmbientTemperatureSensor ()

销毁传感器。停止传感器若尚未停止。

QAmbientTemperatureReading *QAmbientTemperatureSensor:: reading () const

返回用于此传感器的读取类。

另请参阅 QSensor::reading ().