Qt Positioning
The Qt Positioning API provides positioning information via QML and C++ interfaces.
Currently the API is supported on Android, iOS, macOS, Linux (using GeoClue version 0.12.99), Windows (with GPS receivers exposed as a serial port providing NMEA sentences), and WinRT (using Windows.Devices.Geolocation). Note that the WinRT implementation can also be used in Win32 Desktop uses cases if the underlying platform is Windows 10 or later.
Overview
The Qt Positioning API gives developers the ability to determine a position by using a variety of possible sources, including satellite, or wifi, or text file, and so on. That information can then be used to for example determine a position on a map. In addition satellite information can be retrieved and area based monitoring can be performed.
Getting Started
To load the Qt Positioning module, add the following statement to your .qml files
import QtPositioning 5.11
For C++ projects include the header appropriate for the current use case, for example applications using routes may use
#include <QGeoCoordinate>
The .pro file should have the positioning keyword added
QT += positioning
Licenses
Qt Positioning is available under commercial licenses from The Qt Company. In addition, it is available under free software licenses. Since Qt 5.4, these free software licenses are GNU Lesser General Public License, version 3, or the GNU General Public License, version 2. See Qt Licensing for further details.
Related Information
Overview
Positioning includes all the functionality necessary to find and work with geographic coordinates. It can use a variety of external sources of information, including GPS. This provides us with a coordinate and altitude for the device with additional features such as speed and direction. This provides the fundamental location information used in the API.
References
Positioning introduction: | for QML | for C++ |
API references: | for QML | for C++ |
Position plugins: | Qt Positioning service plugins |
Examples
© 2019 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.