PDA

View Full Version : MySql and Qt 4.3 don't work together



john_crichton
5th May 2008, 18:38
Hello,
I have recently finished a small Qt application that involves database access. I use QMYSQL for access to mysql database. Everything works fine on linux. Today I ported the application to Windows Xp, I installed MySql server and Qt. I tested the mysql connection from console and it worked fine. The problem is that I cannot connect to database from my application. The QSqlDatabase :: open method returns false. Does anyone have any idea why this is happening?

fnmblot
8th May 2008, 19:26
Did you build the MySQL plugin on Windows? The process is in the wiki. (http://wiki.qtcentre.org/index.php?title=Building_the_QMYSQL_plugin_on_Wind ows_using_MinGW)

john_crichton
9th May 2008, 11:57
Hello, thank you very much. I followed the instructions from the link and I installed the MySql plugin and now the application works on windows as well. Thank you again.