本页内容

QGyroscopeReading Class

QGyroscopeReading 类表示来自陀螺仪传感器的一次读数。更多内容...

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

属性

  • x : qreal
  • y : qreal
  • z : qreal

公共函数

void setX(qreal x)
void setY(qreal y)
void setZ(qreal z)
qreal x() const
qreal y() const
qreal z() const

详细说明

QGyroscopeReading 单位

该读数包含3个值,单位为度/秒,用于描述设备围绕x、y和z轴的运动。与QRotationReading 不同,这些值表示当前的角速度,而非固定的旋转角度。测量单位为度/秒。

显示绕x、y和z轴角速度的带弯曲箭头的装置

属性文档

[read-only] x : qreal

该属性表示绕 x 轴的角速度。

单位为度/秒。

访问函数:

qreal x() const

另请参阅 QGyroscopeReading Units 。

[read-only] y : qreal

该属性表示绕 y 轴的角速度。

单位为度/秒。

访问函数:

qreal y() const

另请参阅 QGyroscopeReading Units 。

[read-only] z : qreal

该属性表示绕 z 轴的角速度。

单位为度/秒。

访问函数:

qreal z() const

另请参阅 QGyroscopeReading Units 。

成员函数文档

void QGyroscopeReading::setX(qreal x)

将绕x轴的角速度设置为x 。

另请参阅 x()。

void QGyroscopeReading::setY(qreal y)

将围绕 y 轴的角速度设置为y 。

另请参阅 y()。

void QGyroscopeReading::setZ(qreal z)

将围绕 z 轴的角速度设置为z 。

另请参阅 z()。

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