Guest User

Untitled

a guest
May 11th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. from qgis.core import *
  2. uri = "MySQL:xxx,host=localhost,port=3306,user=root,password=xxx|
  3. layername=xxx"
  4. vlayer = QgsVectorLayer( uri, "xxx", "ogr" )
  5. QgsMapLayerRegistry.instance().addMapLayer(vlayer)
Add Comment
Please, Sign In to add comment