Connecting QGIS, SpatiaLite and Python?

المشرف العام

Administrator
طاقم الإدارة
I am trying to connect with python code, QGIS and Spatialite, to do SQL query. I have read some tips and I tried with this code, but no add anything.

Any Idea?

uri=QgsDataSourceURI() uri.setDatabase('C:\Users\pr\Desktop\GIS.sqlite') schema=' ' table ='ambi' geom_column= 'geom' uri.setDataSource(schema, table, geom_column) display_name=('prueba') vlayer=QgsVectorLayer(uri.uri(), display_name, 'spatialite')

أكثر...
 
أعلى