[Qgis-developer] (no subject)
ludo
ludovic.granjon at wanadoo.fr
Fri Aug 24 03:09:19 PDT 2012
Hi all
I try to start the developpement for a custom application with qgis, so I try simple things like add a vector layer but I have some problems. In a python console when I try to do something like that :
>>> core.QgsApplication.setPrefixPath('/usr',True)
>>> core.QgsApplication.initQgis()
>>> l = core.QgsVectorLayer('/home/ludo/data/test.shp', 'test', 'ogr')
>>> l.isValid()
I always have a False result
But if I try in the python console of qgis :
>>> l = QgsVectorLayer('/home/ludo/data/test.shp', 'test', 'ogr')
>>> l.isValid()
The result is True
Is someone have an idea ? Are there any other documentation that http://qgis.org/pyqgis-cookbook/
Thanks a lot
Ludovic
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20120824/c0b9caa3/attachment.html>
More information about the Qgis-developer
mailing list