View Full Version : another qmysql error

24th August 2006, 14:48
I am trying to do a simple connect to a mysql db

QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");

I get the error:

QSqlDatabase: QMYSQL driver not loaded

I have searched and tried the following

int main( int argc, char **argv )
QCoreApplication app( argc, argv );
qDebug() << QSqlDatabase::drivers();

However the output is simply:

I have all the mysql packages installed on my Fed 5 distro. I am using Qt4. I can see the qt-mysql.h file, or whatever it is called. I have tried to do the configure thing from the faq's here and at trolltech's site, but I always get can't find configure or bad command. I don't even know the location to run this configure script from. Any help would be appreciated.

24th August 2006, 14:58
It looks like you have no database drivers installed. How did you install Qt4?

24th August 2006, 15:01
I have Fedora 5, like I said so:

yum install qt4
yum install qt4-devel
yum install qt4-config

24th August 2006, 15:03
Then maybe you need qt4-mysql or similar package?

24th August 2006, 15:07
yum install qt4-mysql

that is the solution....thanks again.