[Qgis-developer] Qgis Library Tutorial

Francis Bolduc fbolduc at gmail.com
Tue Sep 5 09:27:37 EDT 2006


Good post on your blog! I think it will really help people who are
looking into qgis for the first time.

Also, I have a comment. If one wants to use qgis libraries after
having installed qgis, I would rather suggest beginning the
application with:

  QgsApplication app(argc, argv, TRUE);

Rather than:

  QApplication app(argc, argv);

Because QgsApplication, once instanciated, gives you access to the
plugin path. So instead of doing this:

  QString myPluginsDir = "/home/timlinux/apps/lib/qgis";
  QgsProviderRegistry::instance(myPluginsDir);

You can actually do it more simply like this:

  QgsProviderRegistry::instance(QgsApplication::pluginPath());


Anyway, good job!


On 9/5/06, Tim Sutton <tim at linfiniti.com> wrote:
>
> Hi
>
> http://blog.qgis.org/?q=node/10
>
> Thanks again Francis!
>
> Regards
>
> Tim
>
>
> On 04/09/2006, at 19:51, Francis Bolduc wrote:
>
>
> As requested by timlinux, here is a simple project demonstrating how
> to use the Qgis library to create custom application. It consists of a
> single Widget containing a MapCanvas containing a PostGIS layer.
> Please feel free to copy/distribute/modify it as you want.
>
>
> The .pro file should be modified to suit your configuration.
> <main.cpp>
> <tutorial.pro>_______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.qgis.org
> http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
>
>
> --
> Tim Sutton
>
> Visit http://qgis.org for a great Open Source GIS
> Home Page: http://linfiniti.com
> Skype: timlinux
> MSN: tim_bdworld at msn.com
> Yahoo: tim_bdworld at yahoo.com
> Jabber: timlinux
> Irc: timlinux on #qgis at freenode.net
>
>
>
>



More information about the Qgis-developer mailing list