QmlSensors QML Type
QmlSensors シングルトンは、モジュール API を提供します。詳細...
| Import Statement: | import QtSensors |
| Since: | QtSensors 5.0 |
メソッド
- string defaultSensorForType(type)
- list<string> sensorTypes()
- list<string> sensorsForType(type)
詳細な説明
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() を参照してください。
© 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.