Qt Positioning C++ Classes
The Positioning module provides positioning information via QML and C++ interfaces. More...
Detailed Description
To load the Qt Positioning module, add the following statement to your .qml files
import QtPositioning
For C++ projects include the header appropriate for the current use case, for example applications using routes may use
#include <QGeoCoordinate>
Using the Module
Using a Qt module requires linking against the module library, either directly or through other dependencies. Several build tools have dedicated support for this, including CMake and qmake.
Building with CMake
Use the find_package()
command to locate the needed module components in the Qt6
package:
find_package(Qt6 REQUIRED COMPONENTS Positioning) target_link_libraries(mytarget PRIVATE Qt6::Positioning)
Building with qmake
To configure the module for building with qmake, add the module as a value of the QT
variable in the project's .pro file:
QT += positioning
See more in the Qt Positioning Overview.