QTiltReading 類

QTiltReading 類保持來自傾斜傳感器的讀數。 更多...

頭: #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

This property holds the amount of tilt on the X axis, measured in degrees.

訪問函數:

qreal xRotation () const

[read-only] yRotation : const qreal

This property holds the amount of tilt on the Y axis, measured in degrees.

訪問函數:

qreal yRotation () const

成員函數文檔編製

void QTiltReading:: setXRotation ( qreal x )

設置 xRotation to x 度。

另請參閱 xRotation ().

void QTiltReading:: setYRotation ( qreal y )

設置 yRotation to y 度。

另請參閱 yRotation ().