I am trying to do a simple connect to a mysql db
db.setHostName("localhost");
db.setDatabaseName("iff");
QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
db.setHostName("localhost");
db.setDatabaseName("iff");
To copy to clipboard, switch view to plain text mode
I get the error:
QSqlDatabase: QMYSQL driver not loaded
To copy to clipboard, switch view to plain text mode
I have searched and tried the following
int main( int argc, char **argv )
{
}
int main( int argc, char **argv )
{
QCoreApplication app( argc, argv );
qDebug() << QSqlDatabase::drivers();
}
To copy to clipboard, switch view to plain text mode
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.
Bookmarks