Sunday, 11 August 2019

postgis - How to add a new database connection to QGIS with Python?



I have a plugin for QGIS that helps to populate databases. The user has the option to create a new database or to use an existing connection. If the user chooses to make a new database, I would also like to add this database as a new connection in the browser panel :


enter image description here


I can find lots of help on connecting to the database, which I have been able to do, but nothing for how to add a new connection. Is this possible?




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...