1

I'm new here I want to run this code :

QApplication a(argc, argv);
QSqlDatabase::addDatabase("QMYSQL");
teste w;
w.show();
return a.exec();

when I try to run it I become this fault

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

I have window7, 32 bit System , Msql 5.1.72, qt.5.1.1, visual Studio 2010

Any advice please ?

1
  • You can see my answer here. Hope that helps. Commented May 28, 2020 at 9:57

2 Answers 2

1

The error message hints that you have missed the QMYSQL plugin. You may take a look at Qt Documentation on how to build it on Windows.

Sign up to request clarification or add additional context in comments.

Comments

0

Sometimes it is only need to Copy libmysql.dll from %mysql%\lib to C:\Windows

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.