Auf dieser Seite

QmlSensors QML Type

Das Singleton „QmlSensors“ stellt die Modul-API bereit. Mehr...

Import Statement: import QtSensors
Since: QtSensors 5.0

Methoden

Ausführliche Beschreibung

Das Singleton „QmlSensors“ stellt die Modul-API bereit.

Dieses Element kann nicht direkt erstellt werden, aber auf seine Funktionalität kann wie unten dargestellt als QML-Singleton zugegriffen werden:

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

Methodendokumentation

string defaultSensorForType(type)

Gibt die Standard-Sensor-ID zurück, die für „ type “ registriert wurde.

Weitere Informationen finden Sie unter QSensor::defaultSensorForType().

list<string> sensorTypes()

Gibt eine Liste der registrierten Sensortypen zurück.

Weitere Informationen finden Sie unter QSensor::sensorTypes().

list<string> sensorsForType(type)

Gibt eine Liste der Sensor-IDs zurück, die für „ type “ registriert wurden.

Weitere Informationen finden Sie unter 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.