Pyside + Mysql = driver not loaded
self.db = QSqlDatabase.addDatabase("QMYSQL")
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QODBC3 QODBC QPSQL7 QPSQL
please use the tag on the top right of your screen. This has been asked a lot already. All solutions can be found "here":http://developer.qt.nokia.com/search/tag/mysql.
I you have any specific questions after that feel free to ask here.
I find answer about qt+mysql, but not about pyside + mysql. I try copy libmysql.dll, in pyside directory, but it not work.
Did you have a look at "this page":http://developer.qt.nokia.com/wiki/Building_PySide?
Did you compile it yourself or did you use an installer?
What OS are you using?
PySide are the Qt bindings for python. Loading a plugin (like the mysql driver) should work the same way as it does with C++. "How to build the MySQL driver plugin":http://doc.qt.nokia.com/4.7/sql-driver.html#qmysql
I using windows and use installer.
@Now the following libraries are ready in C:\Qt\4.6.2\plugins\sqldrivers.
To use the SDK and QtCreator directly, copy these libraries to your C:\Qt...\qt\plugins\sqldrivers, and copy C:\MySQL\MySQL51\lib\opt\libmysql.dll to your C:\Qt...\qt\bin.@
I copy this files from C:\Qt\2010.05\qt\plugins\sqldrivers to pyside plugins\sqldrivers, but this not help.
Currently I have the same problem. Any solution for this?
Seems PySide only supports sqlite so far:
Not sure where the documentation for this is.