In questa pagina

QSensorBackendFactory Class

La classe `QSensorBackendFactory` crea istanze di ` QSensorBackend`. Per saperne di più...

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

Funzioni pubbliche

virtual QSensorBackend *createBackend(QSensor *sensor) = 0

Descrizione dettagliata

Questa interfaccia deve essere implementata per registrare un backend del sensore.

Vedi anche Creazione di un plugin per sensori.

Documentazione delle funzioni membro

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

Istanziare un backend. Se la factory gestisce più identificatori, dovrebbe verificare con l’ sensor quale sia quello richiesto.

Se la factory non è in grado di creare un backend, deve restituire 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.