Qt Positioning Plugin GeoClue v2
Visión general
Este plugin es una interfaz para la biblioteca GeoClue v2. Requiere que esta biblioteca esté instalada en el sistema para funcionar.
El plugin utiliza D-Bus para establecer comunicación con el servicio D-Bus de GeoClue v2 y proporcionar información de posicionamiento.
El complemento puede utilizarse para recibir sólo la información de posicionamiento. No proporciona información sobre satélites.
El plugin puede cargarse utilizando el nombre del proveedor geoclue2.
Parámetros
La siguiente tabla enumera los parámetros que pueden pasarse al plugin geoclue2.
| Parámetro | Descripción |
|---|---|
| desktopId | La propiedad Desktop Id utilizada por el servicio D-Bus. Si no se especifica el parámetro, se utilizará el nombre del archivo de escritorio proporcionado por QGuiApplication::desktopFileName(). |
Ejemplos
Los siguientes ejemplos muestran cómo crear un geoclue2 PositionSource desde C++ y QML.
QML
PositionSource {
name: "geoclue2"
PluginParameter { name: "desktopId"; value: "SomeIdentifierString" }
}C++
QVariantMap params; params["desktopId"] = "SomeIdentifierString"; QGeoPositionInfoSource *positionSource = QGeoPositionInfoSource::createSource("geoclue2", params, this);
© 2026 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.