Platform:
MySQL is setup here as well.
I want to establish database connection with Qt and MySQL. The following line
QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
generates error like below:
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QODBC3 QODBC
It seems QMYSQL driver is absent here. What to do?
You need to build the Qt/MySQL driver. See the documentation.