このページでは

QSensorPluginInterface Class

QSensorPluginInterface クラスは、センサープラグインに対する純粋仮想インターフェースです。詳細...

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

パブリック関数

virtual void registerSensors() = 0

詳細な説明

QSensorPluginInterface クラスは、センサープラグイン内で実装され、QSensorManager にセンサーバックエンドを登録するために使用されます。

「センサープラグインの作成」も参照してください 。

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

[pure virtual] void QSensorPluginInterface::registerSensors()

この関数は、プラグインが読み込まれたときに呼び出されます。プラグインは、QSensorManager::registerBackend() を呼び出すことで、センサーバックエンドを登録する必要があります。他のセンサーを利用するバックエンドについては、代わりに QSensorPluginInterface::sensorsChanged() メソッドで登録する必要があります。

「センサープラグインの作成」も参照してください 。

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