In questa pagina

QSensorPluginInterface Class

La classe QSensorPluginInterface è l'interfaccia puramente virtuale per i plugin dei sensori. Per saperne di più...

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

Funzioni pubbliche

virtual void registerSensors() = 0

Descrizione dettagliata

La classe QSensorPluginInterface viene implementata nei plugin dei sensori per registrare i backend dei sensori con QSensorManager.

Vedi anche Creazione di un plugin per sensori.

Documentazione delle funzioni membro

[pure virtual] void QSensorPluginInterface::registerSensors()

Questa funzione viene chiamata al caricamento del plugin. Il plugin deve registrare i backend dei sensori chiamando la funzione ` QSensorManager::registerBackend()`. Eventuali backend che utilizzano altri sensori devono invece essere registrati nel metodo `QSensorPluginInterface::sensorsChanged()`.

Vedi anche Creazione di un plugin per sensori.

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