3

I'd like to get into qgis-plugin development, but am rather new to both python and QGIS development.

I intend to write a plugin which connects data from a mysql database to shapefiles. As the data is related to persons, I need a kind of login before accessing the data. To avoid the user from typing his password every time he invokes the script, I wonder if it is possible to retain values between calls of the script. In the python cookbook, I found global project settings - but that is not quite what I'm looking for as the values should be forgotten on closing QGIS.

I hope I made my intentions clear in my clumpy English and somebody could give me a hint with which way to proceed.

1

You can use the classQGSCredentials to set and get credentials:

http://qgis.org/api/classQgsCredentials.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.