[Qgis-developer] Load non spatial data with pyqgis (csv, txt, sqlite)

romain riviere romain.riviere.974 at gmail.com
Thu Aug 18 17:53:40 EDT 2011


Hi,

I know that QGIS is able to load csv, txt and Sqlite tables (no geometry)
via 'Load vector layer'.
I wonder how to do this with pyqgis ?  (the cookbook only describe loading
spatial data).

My goal is to Load a non geometric spatialite table, which is exactly the
same as an sqlite table, in QGIS via python.
I've tried by replacing: uri.setDataSource(' ', table, geomField, ' ',
idField)   by uri.setDataSource(' ', table, ' ', ' ',  ' ') but it doesn't
work...

I guess I've missed something

Thanks in advance,
Romain,
*
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20110819/a67cfeaa/attachment.html


More information about the Qgis-developer mailing list