Determining the device location

Many devices support position determination, either through hardware such as a Global Positioning System (GPS) receiver or through network resources such as Internet Protocol (IP) geolocation. Similar to the other sensor support, this facility was introduced to Qt in Qt 4.x through the Qt Mobility module and is now supported through the Qt Positioning module. It's supported on many mobile devices, including Android.

To use the Qt Positioning module, you need to include the positioning keyword in your .pro file, as follows:

QT += qml quick network positioning

The Qt Positioning module provides three types of positioning; you can access these by importing the QtPositioning module:

  • PositionSource: This provides position ...

Get Application Development with Qt Creator - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.