dimanche 1 mai 2016

QT : QSqlDatabase: QMYSQL driver not loaded [WINDOWS]

Salam Alikom

Hi Everyone

i'm trying to create a QT interface to connect to MYSQL database but it's giving alwas an error

QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7

this my code

QSqlDatabase db1 = QSqlDatabase::addDatabase("QMYSQL");
db1.setHostName("localhost");
db1.setUserName("root");
db1.setPassword("");
db1.setDatabaseName("journal_machine");

i tried some solutions but it doesn't work

this my Configuration

QT Creator 2.8.1

QT 5.1.1 (MSVC2010 , 32bit)

Windows 10 64 bit

Thanks in advance

Aucun commentaire:

Enregistrer un commentaire