IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QmlSensors QML Type

The QmlSensors singleton provides the module API.

This type was introduced in QtSensors 5.0.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QmlSensors QML Type

  • Import Statement: import QtSensors

  • Since:: QtSensors 5.0

Detailed Description

The QmlSensors singleton provides the module API.

This element cannot be directly created, but its functionality can be accessed as a QML singleton as illustrated below:

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

Method Documentation

 

string defaultSensorForType(type)

Returns the default sensor identifier that has been registered for type.

Please see QSensor::defaultSensorForType() for information.

list<string> sensorTypes()

Returns a list of the sensor types that have been registered.

Please see QSensor::sensorTypes() for information.

list<string> sensorsForType(type)

Returns a list of the sensor identifiers that have been registered for type.

Please see QSensor::sensorsForType() for information.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+