[Qgis-developer] [RendererV2 Stand alone script] - returning None

Danilo da Silveira Figueira danilomalzao at hotmail.com
Tue Sep 15 12:48:14 PDT 2015


Sorry, i figured it out, i was using the calls in the wrong order, the
correct sequence is the following:

app = QgsApplication([], True)
QgsApplication.setPrefixPath(qgishome, True)
QgsApplication.initQgis()

att,
Danilo

2015-09-15 15:32 GMT-03:00 Danilo da Silveira Figueira <
danilomalzao at hotmail.com>:

> Hi all,
>
> I´m planing to use some features of the Qgis in my python script.
> i am using the function QgsVectorLayer.loadSldStyle that returns true but
> the result of the QgsVectorLayer.rendererV2 not works when i am using the
> script outside of the QGIs. How can i solve this?
> I already have tried adding the following calls to my script:
>
> QgsApplication.setPrefixPath("qgis_path", True)
> QgsApplication.initQgis()
> app = QgsApplication([], True)
>
> Thanks u all.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150915/3bb68838/attachment.html>


More information about the Qgis-developer mailing list