QTiltSensor Class

The QTiltSensor class is a convenience wrapper around QSensor. More...

Header: #include <QTiltSensor>
qmake: QT += sensors
Since: Qt 5.1
Inherits: QSensor

This class was introduced in Qt 5.1.

Public Functions

void calibrate()
  • 37 public functions inherited from QSensor
  • 16 public functions inherited from QObject
typedef QObjectList
typedef qoutputrangelist
typedef qrange
typedef qrangelist

Macros

Additional Inherited Members

  • 20 properties inherited from QSensor
  • 1 property inherited from QObject
  • 2 public slots inherited from QSensor
  • 1 public slot inherited from QObject
  • 12 signals inherited from QSensor
  • 1 signal inherited from QObject
  • 3 static public members inherited from QSensor
  • 5 static public members inherited from QObject
  • 8 protected functions inherited from QObject

Detailed Description

The only behavioural difference is that this class sets the type properly.QMetaObject::invokeMethod(backend(), "calibrate");

This class also features a reading() function that returns a QTiltReading instead of a QSensorReading.

For details about how the sensor works, see QTiltReading.

See also QTiltReading.

Member Function Documentation

void QTiltSensor::calibrate()

Calibrates the tilt sensor. Uses the current tilt angles as 0.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.