本页内容

QLightReading Class

QLightReading 类表示光传感器的一次读数。更多内容...

头文件: #include <QLightReading>
CMake: find_package(Qt6 REQUIRED COMPONENTS Sensors)
target_link_libraries(mytarget PRIVATE Qt6::Sensors)
qmake: QT += sensors
继承自: QSensorReading

属性

公共函数

qreal lux() const
void setLux(qreal lux)

详细说明

QLightReading 单位

光传感器返回以勒克斯(lux)为单位的光照强度。

属性文档

[read-only] lux : qreal

该属性保存光照强度。

单位为勒克斯。

访问函数:

qreal lux() const

另请参阅 QLightReading Units 。

成员函数文档

void QLightReading::setLux(qreal lux)

将亮度级别设置为lux 。

另请参阅 lux()。

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