0

I need to display information about continents by changing the colors of each continent, as is shown in the example image. I don't know how to implement this in Qt, and I don't even know what term to use when looking for more information about this; is it a "continent diagram", "continent statistics chart"?

Initially I thought it could be done with an SVG, but I was unable to change the color of specific paths by id.

I need to be able to update it while the program is running.

What could I use? Thanks.

Example

sempiedram
  • 137
  • 12

1 Answers1

0

I think you could use this solution:

  1. Find SVG file parser(http://doc.qt.io/qt-5/qtsvg-module.html, https://github.com/openwebos/qt/blob/master/src/svg/qsvghandler.cpp)
  2. Use parsed data to generate map of QPainterPath.
  3. Draw generated paths with style you want.
Andrey Semenov
  • 901
  • 11
  • 17