PDA

View Full Version : Database connection problem



MarkoSan
4th September 2008, 10:24
Hi to all!

I've upgraded to 4.4.1 and my app cannot start because of following error:
warning: QSqlDatabase: QMYSQL driver not loaded
warning: QSqlDatabase: available drivers: QSQLITE QMYSQL3 QMYSQL QODBC3 QODBC

I've compiled mysql plugin and copied it to all places where is needed (libmysql*.dll) but it still does not work. Any help please?

187Proof
11th September 2008, 21:18
You have a static Qt library?

Then add the following macro to your cpp file:

Q_IMPORT_PLUGIN(qsqlmysql)

and in your .pro file:

QTPLUGIN += qmysql