SensorGlobal QML Type

SensorGlobal element provides the module API. 更多...

导入语句: import QtSensors 5.0
Since: QtSensors 5.0

方法

详细描述

SensorGlobal element provides the module API.

This element cannot be directly created. It can only be accessed via a namespace import.


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

方法文档编制

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.