error while trying to connect database to qt program



  • 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.


  • Moderators

    @Aita-KANE Which OS? Which Qt version? Do you have MySQL client library?


  • Moderators

    @Aita-KANE
    i guess it's the issue that has been already discussed several times here in the forum.

    You can set QT_DEBUG_PLUGINS=1 env 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.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.