Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
error while trying to connect database to qt program
Aita KANE last edited by
hello guys can someone help me please, i'm trying to connect my database to qt but everytime i compile ther is this ibformation that pop up :
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7
Failed to connect to database.
i seached on google but no solutions worked for me can someone please help me, it's an assignment due tomorrow.
@Aita-KANE Which OS? Which Qt version? Do you have MySQL client library?
i guess it's the issue that has been already discussed several times here in the forum.
You can set
QT_DEBUG_PLUGINS=1env variable and check the log output. It will probably fail to load the Qt mysql plugin because it is linking to the mysql lib, when it can't be found it can't be loaded.