Qt Positioning service plugins

Implementing Qt Positioning plugins

Implementing Qt Positioning plugins

Qt Positioning provides the majority of its functionality through plugins. This document outlines how to develop a new position plugin.

Plugin Description

Each plugin is described by a json file. The json describes the plugins capabilities and version. Below is an example of a json file used by the postionpoll plugin:

<Code snippet "/tmp/snapshot-qt5full-5.12/qt5/qtbase/../../../plugins/position/positionpoll/plugin.json" not found>

The entries have the following meaning:




The unique name/key of the plugin. Each position plugin must have a unique name.


The provider name of the services. Multiple plugins may have the same name. In such cases the Version string will be used to further distinguish the plugins.


Set to true if the plugin implements a QGeoPositionInfoSource .


Set to true if the plugin implements a QGeoSatelliteInfoSource .


Set to true if the plugin implements a QGeoAreaMonitorSource .


The plugin priority. If multiple plugins have the same provider name, the plugin with the higest priority will be used.

Implementing Plugins

A plugin implementer needs to subclass QGeoPositionInfoSourceFactory and override one or more of its functions. If a plugin does not support a specific feature the function should return 0 or utilize the default implementation.

  • areaMonitor()

  • positionInfoSource()

  • satelliteInfoSource()