I am looking for a way to get a map from QGIS into QT Designer. I have the QT Designer version that comes with QGIS, meaning i have all the standard QGIS Widget. I don´t see a map widget, but many things belonging to a map e.g. a mapScaleWidget.

How can I get a few functions and a map into QT?

I can programm a little bit of python, but I have not yet made any plugins myself, because I personally think I can´t programm good enough for that yet.

I also do not know how to install plugins.

  • Why do you want to bring a map into QT Designer? – HeikkiVesanto Jul 8 '16 at 11:05
  • I want to make a programm where you can easily view maps from QGIS. Someone has to use this map, but they have no clue what QGIS is, so i want to make it easier for them to navigate in the map. – Lucas-H Jul 8 '16 at 11:31
  • You might want to start with a bit of research. locatepress.com/ppg – HeikkiVesanto Jul 8 '16 at 11:43
  • I am sorry but i think you missunderstood. I do not have the time to learn a new programming language and i do not have the time to make my own widget. That´s why i wanted to ask if there was anything else to do. like an implemented solution. – Lucas-H Jul 8 '16 at 11:55

You mean QgsMapCanvas?

First place somwhere QWidget. Now right click on this widget and choose "promote" (or replace, I don't remember). Set QgsMapCanvas as class name and set qgis.gui as header file. And that's all, you have a map canvas, you can display layers in this wigdet.

|improve this answer|||||
  • What exaclty is a QWidget? I am sorry i am relatively new to this topic. – Lucas-H Jul 8 '16 at 11:28
  • Here: i.imgur.com/ECJa9CX.png – dmh126 Jul 8 '16 at 11:58
  • Thanks! When i enter your above mentioned things, I can not seem to hit apply for some reason. Why might that be the case? – Lucas-H Jul 8 '16 at 12:04
  • Click "add" first, this class will be displayed in the table above, and than you can "apply". – dmh126 Jul 8 '16 at 12:10
  • now it worked, but it did not do anything. Is something supposed to change? – Lucas-H Jul 8 '16 at 12:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.