QHumidityReading Class
QHumidityReading 类保存湿度传感器的读数。更多
头文件: | #include <QHumidityReading> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Sensors) target_link_libraries(mytarget PRIVATE Qt6::Sensors) |
qmake: | QT += sensors |
继承: | QSensorReading |
属性
- absoluteHumidity : const qreal
- relativeHumidity : const qreal
公共功能
qreal | absoluteHumidity() const |
qreal | relativeHumidity() const |
void | setAbsoluteHumidity(qreal value) |
void | setRelativeHumidity(qreal humidity) |
属性文档
[read-only]
absoluteHumidity : const qreal
绝对湿度 以克/立方米为单位测量。请注意,某些传感器可能不支持绝对湿度。
访问功能:
qreal | absoluteHumidity() const |
另请参阅 QHumidityReading Units 。
[read-only]
relativeHumidity : const qreal
相对湿度 以百分比形式返回。
访问功能:
qreal | relativeHumidity() const |
另请参阅 QHumidityReading Units 。
成员函数文档
void QHumidityReading::setAbsoluteHumidity(qreal value)
将absoluteHumidity 设置为value 。
另请参见 absoluteHumidity() 。
void QHumidityReading::setRelativeHumidity(qreal humidity)
将relativeHumidity 设置为humidity 。
另请参见 relativeHumidity() 。
© 2025 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.