Hi I would like to use SQLite for storing some information in my plugin for QGIS. I have a problem: if I put the db let say test.db among the resources as file, after compilied the resorce.qrc file, QGIS find the db, but if I insert some row in the db, qgis does not find any more I have to compile again the file, I tried to recompile the file every time I commit something in the db, it seems to work, but is a dirty solution and I do not think I can use it on every system different from the mine, is there a better solution?
Don't put your sqlite database into a resource file, that's a really bad idea. You are converting the database into readonly binary data in your resource.py.
EDIT: Seems Qt resources are not meant just for storing strings. Use QSettings instead.
You should store the connection string (if needed) then just connect using something like sqlite3 in the standard python libs.
myConnectionString is defined in your settings ini/registry file as a string.