このページでは

QTiltSensor Class

QTiltSensor クラスは、QSensor をラップした便利なラッパーです。詳細...

ヘッダー: #include <QTiltSensor>
CMake: find_package(Qt6 REQUIRED COMPONENTS Sensors)
target_link_libraries(mytarget PRIVATE Qt6::Sensors)
qmake: QT += sensors
継承元: QSensor

パブリック関数

QTiltSensor(QObject *parent = nullptr)
virtual ~QTiltSensor()
void calibrate()
QTiltReading *reading() const

詳細な説明

動作上の唯一の違いは、このクラスが型を適切に設定する点です。

また、このクラスには、QSensorReading の代わりにQTiltReading を返すreading()関数も備わっています。

センサーの動作の詳細については、「QTiltReading 」を参照してください。

「QTiltReading」も参照してください 。

メンバ関数のドキュメント

[explicit] QTiltSensor::QTiltSensor(QObject *parent = nullptr)

parent の子としてセンサーを作成します。

[virtual noexcept] QTiltSensor::~QTiltSensor()

センサーを破壊する。センサーがまだ停止していない場合は、停止させる。

[invokable] void QTiltSensor::calibrate()

傾斜センサーを校正します。現在の傾斜角度を0度として扱います。

注:この関数は 、メタオブジェクトシステムおよびQMLから呼び出すことができます。Q_INVOKABLE を参照してください。

QTiltReading *QTiltSensor::reading() const

このセンサーの読み取りクラスを返します。

QSensor::reading()も参照してください 。

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