QmlSensors QML Type
O singleton QmlSensors fornece a API do módulo. Mais...
| Import Statement: | import QtSensors |
| Since: | QtSensors 5.0 |
Métodos
- string defaultSensorForType(type)
- list<string> sensorTypes()
- list<string> sensorsForType(type)
Descrição detalhada
O singleton QmlSensors fornece a API do módulo.
Este elemento não pode ser criado diretamente, mas sua funcionalidade pode ser acessada como um singleton QML, conforme ilustrado abaixo:
import QtSensors
import QtSensors as Sensors
...
Component.onCompleted: {
var types = Sensors.QmlSensors.sensorTypes();
console.log(types.join(", "));
}Documentação dos métodos
string defaultSensorForType(type)
Retorna o identificador padrão do sensor que foi registrado para type.
Consulte QSensor::defaultSensorForType() para obter mais informações.
list<string> sensorTypes()
Retorna uma lista dos tipos de sensores que foram registrados.
Consulte QSensor::sensorTypes() para obter mais informações.
list<string> sensorsForType(type)
Retorna uma lista dos identificadores dos sensores que foram registrados para o type.
Consulte QSensor::sensorsForType() para obter mais informações.
© 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.