Global Mapper Pro

GM SDK and Qt

dcoggin Global Mapper UserTrusted User
edited May 2012 in SDK
Mike and others,

I am interested in changing from MFC to Qt for GUI applications. Do you have any words of wisdom in using Global Mapper with Qt? Have you used Qt with the SDK making use of the MFC conversion classes (QWinHost, QWinWidget, QMfcApp)?



  • global_mapper
    global_mapper Administrator
    edited May 2012

    I'm afraid I have no experience using Qt, I'm a MFC guy. However, the SDK doesn't use MFC at all in the external interface, only internally, so it really shouldn't matter what you use in your application. Even the GM_MapWindow class in the C++ sample application only use base GDI and no MFC, so you can use that as well.


    Global Mapper Guru
  • dcoggin
    dcoggin Global Mapper User Trusted User
    edited May 2012
    I didn't think about that. So as long as it's on a windows machine, I suppose the SDK dll can work regardless if the calling application uses Qt. Thanks, Mike.

  • Yann DUPUY
    Yann DUPUY Global Mapper User Trusted User
    edited May 2012

    Just my two cents.
    I developped an application using Qt (4.7.2) and MSVC 2010.
    The only drawback is a #&*$ slowdown with last SDK release.
    I started investigating on that with Mike (See and could not do many tests yet (you know, when Boss wants something... I could do it at home, but when Wife wants something...).

    So I am eagerly waiting for your future results, to see if my performance problem comes from Qt interface!

    Good luck,
  • Toni Heimala
    Toni Heimala Global Mapper User
    edited May 2012
    We are using GlobalMapper SDK as a tool for rendering the map. I have developed a map library that represents the map drawn by GlobalMapper as a QGraphicsScene background and all the other stuff we have are rendered on top of that.

    Works great and there doesn't seem to be much slowdowns, when I have the rendering in a different thread.

    At first I was using the GM_DrawLayerListToMemory() function with QImage::scanLine(0). However many functions in GlobalMapper SDK actually need the device context. So first I tried using QPixmap::toWinHBITMAP() for getting the ready bitmap to use. However you can't use that method if you use threading so I ended up making some wrappers for directly using HDC/HBITMAP under the hood.

    Also because rendering the whole screen takes a lot of time I ended up rendering the parts of map in tiles which improves the speed a lot but introduceses problems with the grid (you have to draw it separately) and labels (GlobalMapper SDK optimizes the label location automatically for you so you end up having the same label for one point in several tiles when the point is near the edge of the tile).
Sign In or Register to comment.