QmlSensors QML Type
El singleton QmlSensors proporciona la API del módulo. Más...
| Import Statement: | import QtSensors |
| Since: | QtSensors 5.0 |
Métodos
- string defaultSensorForType(type)
- list<string> sensorTypes()
- list<string> sensorsForType(type)
Descripción detallada
El singleton QmlSensors proporciona la API del módulo.
Este elemento no se puede crear directamente, pero se puede acceder a su funcionalidad como un singleton QML como se ilustra a continuación:
import QtSensors import QtSensors as Sensors ... Component.onCompleted: { var types = Sensors.QmlSensors.sensorTypes(); console.log(types.join(", ")); }
Documentación de métodos
string defaultSensorForType(type)
Devuelve el identificador de sensor predeterminado que se ha registrado para type.
Consulte QSensor::defaultSensorForType() para obtener más información.
list<string> sensorTypes()
Devuelve una lista de los tipos de sensores que se han registrado.
Consulte QSensor::sensorTypes() para obtener más información.
list<string> sensorsForType(type)
Devuelve una lista de los identificadores de sensor que se han registrado para type.
Consulte QSensor::sensorsForType() para obtener más información.
© 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.