Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from qgis.core import *
- uri = "MySQL:xxx,host=localhost,port=3306,user=root,password=xxx|
- layername=xxx"
- vlayer = QgsVectorLayer( uri, "xxx", "ogr" )
- QgsMapLayerRegistry.instance().addMapLayer(vlayer)
Add Comment
Please, Sign In to add comment