QmlSensors QML Type

QmlSensors シングルトンはモジュール API を提供します。詳細...

Import Statement: import QtSensors
Since: QtSensors 5.0

メソッド

詳細説明

QmlSensors シングルトンはモジュール API を提供します。

この要素を直接作成することはできませんが、以下に示すように QML シングルトンとしてその機能にアクセスすることができます:

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

メソッドの説明

string defaultSensorForType(type)

type に登録されているデフォルトのセンサー識別子を返す。

詳しくはQSensor::defaultSensorForType() を参照。


list<string> sensorTypes()

登録されているセンサータイプのリストを返す。

詳細はQSensor::sensorTypes() を参照.


list<string> sensorsForType(type)

type に登録されているセンサ識別子のリストを返す.

詳しくはQSensor::sensorsForType() を参照。


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