Re: [Qgis-developer] Problems with developing custom c++ qgis application with QtCreator and MSVC2008 on Windows

2014-11-25 Thread eliu1234
Thanks for the link. I have checked out the C++ code example on Github before. But it is just kinda frustrating to see that the examples are mostly from 5 years ago and so much have changed. Also, for the add_raster_layer example in particular, the github does not even have all the files needed

Re: [Qgis-developer] Problems with developing custom c++ qgis application with QtCreator and MSVC2008 on Windows

2014-11-25 Thread eliu1234
Thanks for the link. I have checked out the C++ code example on Github before. But it is just kinda frustrating to see that the examples are mostly from 5 years ago and so much have changed. Also, for the add_raster_layer example in particular, I setup the whole project on my computer and try to

Re: [Qgis-developer] Problems with developing custom c++ qgis application with QtCreator and MSVC2008 on Windows

2014-11-24 Thread eliu1234
QgisInterface is an abstract class. How are you initializing it? Or do you just declare it and add a raster layer directly? Because from that link, I see the addRasterLayer method is a pure virtual function. Nejia wrote QgisInterface *m_ptInterface; See

Re: [Qgis-developer] Problems with developing custom c++ qgis application with QtCreator and MSVC2008 on Windows

2014-11-24 Thread eliu1234
QgisInterface is an abstract class. How are you initializing it? Or do you just declare it and add a raster layer directly? Because from that link, I see the addRasterLayer method is a pure virtual function and QgisInterface is abstract class. I want to add this layer into a QgsMapCanvas, how

Re: [Qgis-developer] Problems with developing custom c++ qgis application with QtCreator and MSVC2008 on Windows

2014-11-24 Thread Nejia
To write QGIS C++ plugin see : http://download.osgeo.org/qgis/doc/manual/qgis-1.1.0_coding-compilation_guide_en.pdf (2.2 Programming a QGIS C++ Plugin in four steps) And you can find some C++ plugin examples here: https://github.com/qgis/QGIS-Code-Examples and

Re: [Qgis-developer] Problems with developing custom c++ qgis application with QtCreator and MSVC2008 on Windows

2014-11-23 Thread Nejia
QgisInterface *m_ptInterface; See http://qgis.org/api/2.6/classQgisInterface.html#a808a34b507a8c4204d607a5857d62748 Regards, Nejia -Message d'origine- De : qgis-developer-boun...@lists.osgeo.org [mailto:qgis-developer-boun...@lists.osgeo.org] De la part de eliu1234 Envoyé : vendredi

Re: [Qgis-developer] Problems with developing custom c++ qgis application with QtCreator and MSVC2008 on Windows

2014-11-21 Thread Nejia
I use the same environment of Qgis to write c++ plugins: http://htmlpreview.github.io/?https://raw.github.com/qgis/QGIS/master/doc/INSTALL.html#toc14 to add raster layer:

Re: [Qgis-developer] Problems with developing custom c++ qgis application with QtCreator and MSVC2008 on Windows

2014-11-21 Thread eliu1234
What is the m_ptInterface in your code? Nejia wrote I use the same environment of Qgis to write c++ plugins: http://htmlpreview.github.io/?https://raw.github.com/qgis/QGIS/master/doc/INSTALL.html#toc14 to add raster layer:

Re: [Qgis-developer] Problems with developing custom c++ qgis application with QtCreator and MSVC2008 on Windows

2014-11-20 Thread Nejia
1- see my response here http://stackoverflow.com/questions/26920574/cannot-find-qgsapplication-h-and -other-header-files/27035138#27035138 -Message d'origine- De : qgis-developer-boun...@lists.osgeo.org [mailto:qgis-developer-boun...@lists.osgeo.org] De la part de eliu1234 Envoyé :

Re: [Qgis-developer] Problems with developing custom c++ qgis application with QtCreator and MSVC2008 on Windows

2014-11-20 Thread eliu1234
Do you have a system setup that can write qgis c++ application? If you do, can you create a valid raster layer from that? Nejia wrote 1- see my response here http://stackoverflow.com/questions/26920574/cannot-find-qgsapplication-h-and -other-header-files/27035138#27035138 -Message

Re: [Qgis-developer] Problems with developing custom c++ qgis application with QtCreator and MSVC2008 on Windows

2014-11-19 Thread eliu1234
1. So in the .proj file, what do i need to change? 2. My Python works in this case, it is the C++ part that is not working. Nejia wrote Hi, 1- QGIS and Qt libraries shipped with Osgeo4W are compiled using release mode so if you want to debug your application you can use RelWithDebInfo

[Qgis-developer] Problems with developing custom c++ qgis application with QtCreator and MSVC2008 on Windows

2014-11-18 Thread eliu1234
I am using qtcreator and msvc2008 for developing the c++ custom application. I followed the following tutorial to setup the system: http://3nids.wordpress.com/2014/02/27/build-and-deploy-c-qgis-app-on-windows/ Problem 1: under debug mode, I cannot create a QgsMapCanvas object. It always exit

Re: [Qgis-developer] Problems with developing custom c++ qgis application with QtCreator and MSVC2008 on Windows

2014-11-18 Thread Nejia
Hi, 1- QGIS and Qt libraries shipped with Osgeo4W are compiled using release mode so if you want to debug your application you can use RelWithDebInfo mode. 2- see: http://gis.stackexchange.com/questions/120823/how-to-load-a-wms-layer-using- pyqgis