Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Maps, Location API, custom plugin and QML



  • Hello,

    I scanned some paper maps and I would like to write an app to display them.
    Initially, I cut it in small tiles and I wanted to display them by using an GridView and an C++ listModel.

    But I discovered the Qt Location API and finally I think that I go to try to create my own plugin map service provider, by sub-classing these classes:
    http://doc.qt.digia.com/qtmobility/location-overview.html#implementing-plugins

    I'm an beginner in c++, this will be maybe difficult, but I will try.

    But I don't understand how to integrate them into QML?
    All these classes are for QWidgets.
    How to subclasse QGeoMapData::paint() to draw a map into the Quick view?
    And how can I call my plugin from the QML?

    There is a way to import maps from C++ to QML, like QQuickImageProvider for images?

    Is there some documentations that can help me?

    Is the QML location API ready for that? Or is it in work in progress?

    Thanks.



  • Ok, I believe that I have to subclasse QQuickPaintedItem or to use the Scene Graphe API.
    http://qt-project.org/doc/qt-5/qtquick-visualcanvas-scenegraph.html#custom-items-using-qpainter

    Hum. I go to use a GridView and a ListModel, it's easier ;-)


Log in to reply