Qt Positioning Plugin GeoClue v2
Panoramica
Questo plugin funge da interfaccia per la libreria GeoClue v2. Per funzionare, richiede che tale libreria sia installata sul sistema.
Il plugin utilizza D-Bus per stabilire la comunicazione con il servizio D-Bus di GeoClue v2 e per fornire informazioni di posizionamento.
Il plugin può essere utilizzato per ricevere esclusivamente le informazioni di posizionamento. Non fornisce informazioni sui satelliti.
Il plugin può essere caricato utilizzando il nome del provider geoclue2.
Parametri
La tabella seguente elenca i parametri che possono essere passati al plugin geoclue2.
| Parametro | Descrizione |
|---|---|
| desktopId | La proprietà Desktop Id utilizzata dal servizio D-Bus. Se il parametro non viene specificato, verrà utilizzato il nome del file del desktop fornito da QGuiApplication::desktopFileName(). |
Esempi
Gli esempi seguenti mostrano come creare un'PositionSource e geoclue2 da C++ e 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.