PDA

View Full Version : another qmysql error



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



QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
db.setHostName("localhost");
db.setDatabaseName("iff");


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.

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

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

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

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

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

that is the solution....thanks again.