1// Copyright (C) 2019 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
6 \title Qt Positioning C++ Classes
8 \qtcmakepackage Positioning
9 \qtvariable positioning
11 \brief The Positioning module provides positioning information via QML and C++ interfaces.
13 To load the Qt Positioning module, add the following statement to your .qml files
15 \snippet doc_src_qtpositioning.qml import
17 For C++ projects include the header appropriate for the current use case,
18 for example applications using routes may use
21 #include <QGeoCoordinate>
24 \include module-use.qdocinc using qt module
27 find_package(Qt6 REQUIRED COMPONENTS Positioning)
28 target_link_libraries(mytarget PRIVATE Qt6::Positioning)
31 \include module-use.qdocinc building with qmake
37 See more in the \l{Qt Positioning}{Qt Positioning Overview}.
44\page qtpositioning-index.html
46\brief The Qt Positioning API provides positioning information via QML and C++ interfaces.
47\ingroup technology-apis
49The Qt Positioning API provides positioning information via QML and C++ interfaces.
51Currently, the API is supported on \l {Qt for Android}{Android},
52\l {Qt for iOS}{iOS}, \l {Qt for macOS}{\macos}, \l {Qt for Linux/X11}{Linux},
53and \l {Qt for Windows}{Windows} (with GPS receivers exposed as a serial port
54providing NMEA sentences or using \c {Windows.Devices.Geolocation}).
58The Qt Positioning API lets you to determine a position by using a variety of
59possible sources, including satellite, wifi, or text files. That information can
60then be used to, for example, determine a position on a map. In addition, you
61can use to the API to retrieve satellite information and perform area based
64\section1 Using the Module
68\include {module-use.qdocinc} {using the qml api} {QtPositioning}
72\include {module-use.qdocinc} {using the c++ api}
74\section3 Building with CMake
76\include {module-use.qdocinc} {building with cmake} {Positioning}
78\section3 Building with qmake
80\include {module-use.qdocinc} {building_with_qmake} {positioning}
84Starting from Qt 6.6, the Qt Positioning module uses new \l QPermission API
85to handle \l {QLocationPermission}{location} permissions. This means that Qt
86itself no longer queries for these permissions, so this needs to be done
87directly from the client application.
89Please refer to the \l {Application Permissions} page for an example of how
90to integrate the new \l QPermission API into the application.
92\section1 Articles and Guides
95 \li \l {Positioning (C++)} {Positioning introduction for C++}
96 \li \l {Positioning (QML)} {Positioning introduction for QML}
97 \li \l {Qt Positioning Plugins}
98 \li \l {Interfaces between C++ and QML Code in Qt Positioning}
99 \li \l {Qt Positioning on Android}
100 \li \l {Qt Positioning on iOS}
106 \li \l {Qt Positioning Examples}
112 \li \l {Qt Positioning C++ Classes}
113 \li \l {Qt Positioning QML Types}
116\section1 Module Evolution
118\l {Changes to Qt Positioning} lists important changes in the module API and
119functionality that were done for the Qt 6 series of Qt.
123Qt Positioning is available under commercial licenses from \l{The Qt Company}.
124In addition, it is available under free software licenses. Since Qt 5.4,
125these free software licenses are
126\l{GNU Lesser General Public License, version 3}, or
127the \l{GNU General Public License, version 2}.
128See \l{Qt Licensing} for further details.