QmlSensors QML Type
Le singleton QmlSensors fournit l'API du module. Plus d'informations...
| Import Statement: | import QtSensors |
| Since: | QtSensors 5.0 |
Méthodes
- string defaultSensorForType(type)
- list<string> sensorTypes()
- list<string> sensorsForType(type)
Description détaillée
Le singleton QmlSensors fournit l'API du module.
Cet élément ne peut pas être créé directement, mais il est possible d'accéder à ses fonctionnalités en tant que singleton QML, comme illustré ci-dessous :
import QtSensors import QtSensors as Sensors ... Component.onCompleted: { var types = Sensors.QmlSensors.sensorTypes(); console.log(types.join(", ")); }
Documentation de la méthode
string defaultSensorForType(type)
Renvoie l'identifiant par défaut du capteur qui a été enregistré pour type.
Voir QSensor::defaultSensorForType() pour plus d'informations.
list<string> sensorTypes()
Renvoie une liste des types de capteurs qui ont été enregistrés.
Pour plus d'informations, voir QSensor::sensorTypes().
list<string> sensorsForType(type)
Renvoie une liste des identificateurs de capteurs qui ont été enregistrés pour type.
Voir QSensor::sensorsForType() pour plus d'informations.
© 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.