The QDistanceReading class holds distance reading in cm from the proximity sensor. 更多...
头: | #include <QDistanceReading> |
qmake: | QT += sensors |
Since: | Qt 5.4 |
继承: | QSensorReading |
该类在 Qt 5.4 引入。
qreal | distance () const |
void | setDistance (qreal distance ) |
The QDistanceReading class holds distance reading in cm from the proximity sensor. Note: Some proximity sensor only support two values for distance, a near and far value. In this case, the sensor should report its maximum range value to represent the far state, and a lesser value to represent the near state.
距离以厘米为单位度量
The distance sensor is typically located in the front face of a device, and thus will measure the distance of an object from the device's front face.
对象与设备正面的距离
访问函数:
qreal | distance () const |
另请参阅 QDistanceReading 单位 .
将距离设为 distance .
另请参阅 distance ().