I have an application which uses Qt library (version 5.8). Said application needs to draw a map, provided by a (local network) map server. The server gives only WMS maps (and is maintained by a third party, so "WMS only" clause is a given).
Qt provides a standard QML cartographic component, Map. It has several out-of-the-box plugins (which basically are responsible for actual tile requests, local tile cache maintenance and some other stuff). Surprisingly, the documentation (see paragraph "Plugin References and Parameters") doesn't tell anything about WMS support (it uses OpenStreetMap as "default" option). Even more surprisingly, information on the subject seems to be scarce. Here are the options I found:
- There is ESRI QML class for displaying WMS layers, which requires installing the whole ArcGIS SDK, which looks heavy;
- One can write a QML plugin of their own. But even though all I need is to change the request URLs, there seems to be no easy way to reuse existing logic of, say, OSM plugin for other plugin responsibilities (and that's a substantial amount of code);
- A web browser component can be used in QML; it can open a local HTML page with OpenLayers or the like. That's significant overhead and in my particular case will cause problems with proxy settings (the browser component is already used in other part of the application).
My question is: are there any other known ways to use WMS server with QML components? Cartography isn't the primary focus of the application, so it doesn't require complex features like geocoding or routing.