このページでは

QSensorBackendFactory Class

QSensorBackendFactory クラスは、QSensorBackend のインスタンスを作成します。詳細...

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

パブリック関数

virtual QSensorBackend *createBackend(QSensor *sensor) = 0

詳細な説明

センサーバックエンドを登録するには、このインターフェースを実装する必要があります。

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

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

[pure virtual] QSensorBackend *QSensorBackendFactory::createBackend(QSensor *sensor)

バックエンドをインスタンス化します。ファクトリが複数の識別子を扱う場合は、sensor を確認して、どの識別子が要求されているかを確認する必要があります。

ファクトリがバックエンドを作成できない場合は、0を返す必要があります。

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