Book Image

Application Development with Qt Creator - Second Edition

Book Image

Application Development with Qt Creator - Second Edition

Overview of this book

Table of Contents (20 chapters)
Application Development with Qt Creator Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Sensors in Qt


Qt has had a robust porting layer for device sensors for several years, starting with the Qt Mobility libraries meant to facilitate software development for cell phones. As Qt continued to evolve, support for sensors was added to Qt Quick, and the list of supported sensors grew. Today, Qt supports the following sensors:

  • An accelerometer is supported through the Accelerometer type

  • An altimeter is supported through the Altimeter type

  • An ambient light sensor is supported through the AmbientLightSensor and LightSensor types

  • An ambient temperature sensor is supported through the AmbientTemperatureSensor type

  • A compass is supported through the Compass type

  • A gyroscope is supported through the Gyroscope type

  • Whether or not the device is in a holster is determined through the Holster type

  • Proximity to the device's screen is determined through the IRProximitySensor and ProximitySensor types

  • An ambient magnetic field is supported through the Magnetometer type

  • The device's orientation is supported...