How to connect MySQL with Qt 4.7.3?
-
Hello,
I was trying to connect my Qt code with MySQL Database. However, I got to know that only SQLite is supported in open source Qt and we need to get the drivers for MySQL on our own. Can anyone please tell me How to do it?
And most IMPORTANT: I have searched google and yahoo and a lot. All I got is simply some $QTDIR/src/plugins/ and ....
However, I don't have any file or directory named /src/ in my Qt installation.
I am here by providing what I am using and will look forward to your suggestion:- Qt SDK 4.7.3
- MySQL
- Qt installation folder: /home/pkr/QtSDK
- MySQL installation: /usr/share/mysql
- OS: Ubuntu 12.04
6: DM: GNOME 3.0
Please help me out!!! It's urgent :(
[Edit: Removed the URGENT tag from your headline. mlong]
-
Make sure you have installed the Qt sources using the SDK maintenance tool, "download":http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-src-4.8.2.zip them manually or "get the source":http://qt-project.org/wiki/Get_The_Source from the repository.
"How to Build the QMYSQL Plugin on Unix and Mac OS X":http://qt-project.org/doc/qt-4.8/sql-driver.html#how-to-build-the-qmysql-plugin-on-unix-and-mac-os-x
-
Thanks Lukas for the reply. However, I am not able to understand how to install it on my Qt Directory (/home/pkr/QtSDK/...). I have downloaded the "Qt sources from here":http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-src-4.8.2.zip. Can you please help me out how to do that. I am waiting for your reply. I am a novice please forgive me for stupid question :(