Qt Sensors QML Types

QML Module API

If the module is imported into a namespace, some additional methods become available.

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

The documentation for the module API can be found in SensorGlobal.

QML Sensor types

These types represent specific types of sensors.

Note that most properties come from the abstract Sensor element.

Accelerometer

The Accelerometer element reports on linear acceleration along the X, Y and Z axes.

Altimeter

The Altimeter element reports on altitude.

AmbientLightSensor

The AmbientLightSensor element repors on ambient lighting conditions.

AmbientTemperatureSensor

The AmbientTemperatureSensor element reports on the ambient temperature.

Compass

The Compass element reports on heading using magnetic north as a reference.

Gyroscope

The Gyroscope element reports on rotational acceleration around the X, Y and Z axes.

HolsterSensor

The HolsterSensor element reports on whether a device is holstered.

IRProximitySensor

The IRProximitySensor element reports on infra-red reflectance values.

LightSensor

The LightSensor element reports on light levels using LUX.

Magnetometer

The Magnetometer element reports on magnetic field strength along the Z, Y and Z axes.

OrientationSensor

The OrientationSensor element reports device orientation.

PressureSensor

The PressureSensor element reports on atmospheric pressure values.

ProximitySensor

The ProximitySensor element reports on object proximity.

RotationSensor

The RotationSensor element reports on device rotation around the X, Y and Z axes.

TapSensor

The TapSensor element reports tap and double tap events along the X, Y and Z axes.

TiltSensor

The TiltSensor element reports tilt events along the X and Y axes.

QML Reading types

The data from a sensor comes via a reading class.

AccelerometerReading

The AccelerometerReading element holds the most recent Accelerometer reading.

AltimeterReading

The AltimeterReading element holds the most recent Altimeter reading.

AmbientLightReading

The AmbientLightReading element holds the most AmbientLightSensor reading.

AmbientTemperatureReading

The AmbientTemperatureReading element holds the most recent temperature reading.

CompassReading

The CompassReading element holds the most recent Compass reading.

GyroscopeReading

The GyroscopeReading element holds the most recent Gyroscope reading.

HolsterReading

The HolsterReading element holds the most recent HolsterSensor reading.

IRProximityReading

The IRProximityReading element holds the most recent IR proximity reading.

LightReading

The LightReading element holds the most recent LightSensor reading.

MagnetometerReading

The MagnetometerReading element holds the most recent Magnetometer reading.

OrientationReading

The OrientationReading element holds the most recent OrientationSensor reading.

PressureReading

The PressureReading element holds the most recent PressureSensor reading.

ProximityReading

The ProximityReading element holds the most recent ProximitySensor reading.

RotationReading

The RotationReading element holds the most recent RotationSensor reading.

TapReading

The TapReading element holds the most recent TapSensor reading.

TiltReading

The TiltReading element holds the most recent TiltSensor reading.

Accelerometer

The Accelerometer element reports on linear acceleration along the X, Y and Z axes.

AccelerometerReading

The AccelerometerReading element holds the most recent Accelerometer reading.

Altimeter

The Altimeter element reports on altitude.

AltimeterReading

The AltimeterReading element holds the most recent Altimeter reading.

AmbientLightSensor

The AmbientLightSensor element repors on ambient lighting conditions.

AmbientLightReading

The AmbientLightReading element holds the most AmbientLightSensor reading.

AmbientTemperatureSensor

The AmbientTemperatureSensor element reports on the ambient temperature.

AmbientTemperatureReading

The AmbientTemperatureReading element holds the most recent temperature reading.

Compass

The Compass element reports on heading using magnetic north as a reference.

CompassReading

The CompassReading element holds the most recent Compass reading.

Gyroscope

The Gyroscope element reports on rotational acceleration around the X, Y and Z axes.

GyroscopeReading

The GyroscopeReading element holds the most recent Gyroscope reading.

HolsterSensor

The HolsterSensor element reports on whether a device is holstered.

HolsterReading

The HolsterReading element holds the most recent HolsterSensor reading.

IRProximitySensor

The IRProximitySensor element reports on infra-red reflectance values.

IRProximityReading

The IRProximityReading element holds the most recent IR proximity reading.

LightSensor

The LightSensor element reports on light levels using LUX.

LightReading

The LightReading element holds the most recent LightSensor reading.

Magnetometer

The Magnetometer element reports on magnetic field strength along the Z, Y and Z axes.

MagnetometerReading

The MagnetometerReading element holds the most recent Magnetometer reading.

OrientationSensor

The OrientationSensor element reports device orientation.

OrientationReading

The OrientationReading element holds the most recent OrientationSensor reading.

PressureSensor

The PressureSensor element reports on atmospheric pressure values.

PressureReading

The PressureReading element holds the most recent PressureSensor reading.

ProximitySensor

The ProximitySensor element reports on object proximity.

ProximityReading

The ProximityReading element holds the most recent ProximitySensor reading.

RotationSensor

The RotationSensor element reports on device rotation around the X, Y and Z axes.

RotationReading

The RotationReading element holds the most recent RotationSensor reading.

Sensor

The Sensor element serves as a base type for sensors.

SensorReading

The SensorReading element serves as a base type for sensor readings.

SensorGesture

Provides notifications when sensor-based gestures are detected.

SensorGlobal

The SensorGlobal element provides the module API.

TapSensor

The TapSensor element reports tap and double tap events along the X, Y and Z axes.

TapReading

The TapReading element holds the most recent TapSensor reading.

TiltSensor

The TiltSensor element reports tilt events along the X and Y axes.

TiltReading

The TiltReading element holds the most recent TiltSensor reading.