Cross-platform software libraries and APIs
Qt Creator IDE and productivity tools
UI Design tool for UI composition
for Qt projects
Digital advertising for UI apps
Usage intelligence for embedded devices
GUI test automation
Code coverage analysis
Test results management and analysis
Software static code analysis
Software architecture verification
The latest version of Qt.
Make the most of Qt tools, with options for commercial licensing, subscriptions, or open-source.
Explore Qt features, the Framework essentials, modules, tools & add-ons.
The project offers PySide6 - the official Python bindings that enhance Python applications.
Qt empowers productivity across the entire product development lifecycle, from UI design and software development to quality assurance and deployment. Find the solution that best suits your needs.
Insight into the evolution and importance of user-centric trends and strategies.
Learn how to shorten development times, improve user experience, and deploy anywhere.
Tips on efficient development, software architecture, and boosting team happiness.
Get the latest resources, check out upcoming events, and see who’s innovating with Qt.
Stay informed about our live events and webinars, whether they're online, in person, or face-to-face.
Deep dive into the details, tech specs, and everything else you wish to know about Qt tools.
A wealth of Qt knowledge at your fingertips—discover your ideal learning resource or engage with the community.
Whether you're a beginner or a seasoned Qt pro, we have all the help and support you need to succeed.
4月 05, 2017 by 鈴木 佑 | Comments
この記事は The Qt Blog の Provisioning OpenStreetMap providers in QtLocation を翻訳したものです。
執筆: Paolo Angelelli, 2017年3月9日
この記事は Qt 5.6.2 の QtLocation の OpenStreetMap プラグインに対して行った振る舞いに関わる変更を明らかにするためのものです。これらの変更には紛らわしい側面もあったため、改めて説明したいとおもいます。
この OSM プラグインにはタイル用のサーバーの URL がハードコードされていて、その中に含まれる様々なタイプの地図が利用できるようになっていました。利用頻度の高いメインの(道路)地図と衛星地図のタイルは元々はは open.mapquest.com から取得していました。2016年7月に、MapQuest がこのサービスを 廃止した ため、世の中の Qt 5.6.1 以前と 5.7.0 の QtLocation の OSM プラグインを利用した地図は、以下のような MapQuest のウェブサイトとサービスの購入のお知らせのタイルが表示されるようになってしまいました。
Qt 5.6.2 未満の MapViewer がひどい見た目に
また同じような状況に陥らないように、ワンクッション挟むようにこの問題を修正することにしました。OSM プラグインを地図のタイプのためのプロバイダーの定義ファイルを maps-redirect.qt.io から取得するように変更しました。このファイルの形式は一般的に用いられる形式(TileJSON など)にかなり近いもので、Qt 用に特別な拡張をしています。具体的なフォーマットについては こちらのファイル(の195行目あたり)に記載がされています。これにより地図のタイプに応じたタイルのソースの変更が可能になり、もし同じような対応が必要になっても、Qt のアップデートやアプリケーションのビルドをしなおす必要がなくなりました。
これらのプロバイダーはサーバー側で Enabled プロパティを false に設定することで一時的に無効化することもできるようになっています。前述のようにあるサービスが本物以外のタイルを提供したりその代替が見つからない際に利用するかもしれません。このプラグインにはネットワーク的に繋がらない場合に備えてバックアップ用の情報がハードコードされています。
残念ながら現時点では良い解像度の衛星画像をオープンに提供しているサービスが見つけられていません。このため、OSM プラグインは最初は(衛星画像も含めた)7つのタイプの地図を提供していますが、ネットワーク経由でプロバイダーの定義ファイルを取得しパースする処理が完了した後は6つに減ります。
以下のスクリーンショットで違いを確認してください。
MapViewer アプリの MapType メニューのプロバイダー情報の取得前後の違いを表示しています。
このアプローチで今回直面した問題は解決できましたが、これが必ずしも望ましい解決方法ではない場合もありえるでしょう。そういった場合に備えて、これを無効化する方法を二つ用意してあります。1つ目はプラグインの osm.mapping.providersrepository.disabled パラメーターを true に設定することです。これにより、プラグインはネットワーク経由でプロバイダーの情報を取得せずに、ハードコードされた情報のみを利用します。この手法だけでは当初の問題が解決できないため、もう一つのパラメーターを用意しました。osm.mapping.providersrepository.address はデフォルトの URL、5.6.2 と 5.7.1 向けの http://maps-redirect.qt.io/osm/5.6/と 5.8.0 以降向けの http://maps-redirect.qt.io/osm/5.8/ を上書きするためのパラメーターです。street, satellite, cycle, transit, night-transit, terrain, hiking に対応するプロバイダーの定義がかかれているファイルを用意し、参照する URL に書き換えることが可能です。URL を file:/// や qrc:/ にすることでローカルのファイルの使用も可能になるので、定義ファイルをアプリケーションにバンドルして配布することも可能になっています。
最後に、この方法でも100%はフェイルセーフではないことを心に留めておいてください。地図サービスは The Qt Company とは契約関係にないサードバーティによって提供されているものです。もっと確かな方法が必要な場合は様々なプラグインの中から我々がサポートが可能な商用サービス向けのプラグインを検討してみてください。
Download the latest release here: www.qt.io/download.
Qt 6.6. is a feature release with focus on improving UX capabilities including responsive UI technology and the Qt Graph module.
Check out all our open positions here and follow us on Instagram to see what it's like to be #QtPeople.
10 22, 2023
無効なQMLイメージのソースをロードする際の問題が報告され、CVE ID CVE-2023-45872が割り当てられました。..
10 18, 2023
最近 Windows で報告された GDI フォントエンジンの問題は、CVE ID CVE-2023-43114 が割り当てられ、Qt 6.5.3..
9 22, 2023
本稿は「Two Qt security advisorys: GDI Font Engine & WebP image format」の抄訳です。..
Qt Group includes The Qt Company Oy and its global subsidiaries and affiliates.