In questa pagina

QmlSensors QML Type

Il singleton QmlSensors fornisce l'API del modulo. Per saperne di più...

Import Statement: import QtSensors
Since: QtSensors 5.0

Metodi

Descrizione dettagliata

Il singleton QmlSensors fornisce l'API del modulo.

Questo elemento non può essere creato direttamente, ma è possibile accedere alle sue funzionalità come singleton QML, come illustrato di seguito:

import QtSensors
import QtSensors as Sensors
...
    Component.onCompleted: {
        var types = Sensors.QmlSensors.sensorTypes();
        console.log(types.join(", "));
    }

Documentazione dei metodi

string defaultSensorForType(type)

Restituisce l'identificatore predefinito del sensore registrato per type.

Per ulteriori informazioni, consultare QSensor::defaultSensorForType().

list<string> sensorTypes()

Restituisce un elenco dei tipi di sensori che sono stati registrati.

Per ulteriori informazioni, consultare QSensor::sensorTypes().

list<string> sensorsForType(type)

Restituisce un elenco degli identificatori dei sensori registrati per type.

Per ulteriori informazioni, consultare QSensor::sensorsForType().

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