このページでは

Qt Positioning GeoClue v2 プラグイン

概要

このプラグインは、GeoClue v2ライブラリへのインターフェースです。動作するには、システムにこのライブラリがインストールされている必要があります。

このプラグインは、D-Bus を使用して GeoClue v2 の D-Bus サービスとの通信を確立し、位置情報を提供します。

このプラグインは、位置情報の受信のみに使用できます。衛星情報は提供しません。

このプラグインは、プロバイダ名「geoclue2」を使用して読み込むことができます。

パラメータ

以下の表は、geoclue2 プラグインに渡すことができるパラメータの一覧です。

パラメータ説明
desktopIdD-Bus サービスで使用されるデスクトップ IDプロパティ。このパラメータが指定されていない場合、QGuiApplication::desktopFileName() によって提供されたデスクトップファイル名が使用されます。

例

以下の例は、C++ および QML からgeoclue2の `PositionSource ` を作成する方法を示しています。

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.