QSqlDatabase: QMYSQL driver not loaded
-
That's because you don't have the Qt sources installed. Use
maintenancetool
to download them. -
@SGaist
Unbelievable though it was in front of me I had no idea about the "maintenancetool". I am inexperienced with using Qt not know so much about this, but I hope now to learn.I ran as you said the "MaintenanceTool" located in the "Qt" folder and i installed the "sources".
Then I have what I needed! :DThe guide now is satisfactory and effective. ;)
Simply the guide says this path:
cd $QTDIR/qtbase/src/plugins/sqldrivers/mysql
to me is this:
/home/myuser/Qt/5.4/Src/qtbase/src/plugins/sqldrivers/mysql
Then because I have and version "Qt4" this command:
qmake "INCLUDEPATH+=/usr/local/include" "LIBS+=-L/usr/local/lib -lmysqlclient_r" mysql.pro
i run in this way:
/home/myuser/Qt/5.4/gcc/bin/qmake "INCLUDEPATH+=/usr/local/include" "LIBS+=-L/usr/local/lib -lmysqlclient_r" mysql.pro
All now work perfectly! I'm very happy about that! I Struggled a lot with this issue and does not need nor expecting.
Thank you very very much my friends! I am indebted to your with your efficient and fast help!THANK YOU!
-
Hi,
As silly as it may sound: that's the sources of the Qt library.
-
@Gualtix Hi and welcome to devnet, you are not following the current documented procedure.