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

Chapter 9. Sensors and Qt Quick

Many of today's devices come with a myriad of sensors, including a means to determine the device's position and orientation as well as measure the characteristics of its surroundings through thermometers, luminescence sensors, accelerometers, gyroscopes, and other sensors. This is especially true of cell phones and other portable devices.

In this chapter, we will take a look at Qt's sensor and positioning frameworks as they're supported in QML. You'll learn how to determine a device's position on the surface of the earth and how to measure the other characteristics of its environment as reported by its onboard sensors.

In this chapter, we will cover the following topics:

  • Sensors in Qt

  • Determining the device location

  • A simple example