Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QT Creator 5.1 and MYSQL Windows7
this is my first topic here and I'm feeling excited to join the community....
I'm new to QT and recently downloaded QT Creator 5.1.0 for windows 7 from the download page...
It came with no source packages and no SDK package management....
any way I managed to get the mysql source from the internet and compiled it using the includepath and libs arguments and managed to get 4 files....
now what should I do with these files in order to develop a database application connects to mysql server database???
I hope the topic is clear and excuse me for my bad English...
Hi and welcome to devnet,
The QtCreator package is only for QtCreator. The Qt 5.1 installers proposes QtCreator has well as the libraries pre-compiled.
To get on the sql track, have look at the "QtSql module":http://qt-project.org/doc/qt-5.1/qtsql/qtsql-index.html and "Sql Programming":http://qt-project.org/doc/qt-5.1/qtsql/sql-programming.html documents
You can also play with the examples and demos provided with Qt
Thanks for your reply and your welcome :)
Maybe my question was not clear
I don't want to know how to develop mysql using QT
I just want to enable the mysql driver plugin in my QT
so what should I do with the files I mentioned before to enable the mysql driver plugin????
Since they are built, they should already be in the right place. So you just have to tell QDataBase that you want to use QMYSQL and voilà !
Just don't forget to have the mysql dll path in your PATH otherwise the plugin will fail to load.
When I run my app and try to Excecute my code
@QSqlDatabase db= QSqlDatabase::addDatabase("QMYSQL");
I get the output
@QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7@
THER IS NO MYSQL DRIVE INSTALLED !!!
No need to get all uppercase,
check the content of the plugins subfolder in your Qt installation, if the dlls are there, check that their dependencies can be found. If not, copy the dlls there and retry