QTiltReading Class

QTiltReading 类保存倾斜传感器的读数。更多

Header: #include <QTiltReading>
CMake: find_package(Qt6 REQUIRED COMPONENTS Sensors)
target_link_libraries(mytarget PRIVATE Qt6::Sensors)
qmake: QT += sensors
继承: QSensorReading

属性

公共功能

void setXRotation(qreal x)
void setYRotation(qreal y)
qreal xRotation() const
qreal yRotation() const

详细说明

倾斜传感器以度为单位报告设备沿 X 和 Y 平面的倾斜角度。

属性文档

[read-only] xRotation : const qreal

该属性用于保存 X 轴的倾斜度,单位为度。

访问功能:

qreal xRotation() const

[read-only] yRotation : const qreal

该属性用于保存 Y 轴的倾斜度,单位为度。

访问函数

qreal yRotation() const

成员函数文档

void QTiltReading::setXRotation(qreal x)

xRotation 设置为x 度。

另请参阅 xRotation().

void QTiltReading::setYRotation(qreal y)

yRotation 设置为y 度。

另请参阅 yRotation().

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