Operating System: win7 compiler : mingw4.8(come with Qt5.2) link to : Fedora core release 5, kernel 2.6.15-1.2054_FC5 smp on an i686
db = new QSqlDatabase();
db->addDatabase("QMYSQL");
db->setHostName("localhost");
db->setDatabaseName("myclinic");
db->setUserName("root");
db->setPassword(",trth12");
qDebug() << loader.errorString();
qDebug() << "drivers: "<< QSqlDatabase::drivers();
if (db->open())
qDebug() << "Success!";
else
qDebug() << db->lastError().text();
messages
QSqlDatabase: QMYSQL driver not loaded QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL 7 “The shared library was not found.” drivers: (“QSQLITE”, “QMYSQL”, “QMYSQL3”, “QODBC”, “QODBC3”, “QPSQL”, “QPSQL7”)
“Driver not loaded Driver not loaded”
Thanks for the answer, but the problem is not because I lack the qsqlmysql.dll but I don't have the libmysql.dll(looks like this dll do not come with win7).
Here is a video which show you how to install mysql