Results 1 to 5 of 5

Thread: another qmysql error

  1. #1
    Join Date
    Aug 2006
    Posts
    14
    Thanks
    4
    Qt products
    Qt4

    Default another qmysql error

    I am trying to do a simple connect to a mysql db

    Qt Code:
    1. QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
    2. db.setHostName("localhost");
    3. db.setDatabaseName("iff");
    To copy to clipboard, switch view to plain text mode 

    I get the error:
    Qt Code:
    1. QSqlDatabase: QMYSQL driver not loaded
    To copy to clipboard, switch view to plain text mode 

    I have searched and tried the following
    Qt Code:
    1. int main( int argc, char **argv )
    2. {
    3. QCoreApplication app( argc, argv );
    4. qDebug() << QSqlDatabase::drivers();
    5. }
    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.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: another qmysql error

    It looks like you have no database drivers installed. How did you install Qt4?

  3. #3
    Join Date
    Aug 2006
    Posts
    14
    Thanks
    4
    Qt products
    Qt4

    Default Re: another qmysql error

    I have Fedora 5, like I said so:

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

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: another qmysql error

    Then maybe you need qt4-mysql or similar package?

  5. The following user says thank you to jacek for this useful post:

    bluesguy82 (24th August 2006)

  6. #5
    Join Date
    Aug 2006
    Posts
    14
    Thanks
    4
    Qt products
    Qt4

    Default Re: another qmysql error

    yum install qt4-mysql

    that is the solution....thanks again.

Similar Threads

  1. use qpsql
    By raphaelf in forum Installation and Deployment
    Replies: 34
    Last Post: 22nd August 2006, 12:52
  2. Problems
    By euthymos in forum Installation and Deployment
    Replies: 2
    Last Post: 13th June 2006, 19:11
  3. Fed up with M$ Window$ !!! Why is Tux leaving me alone???
    By fullmetalcoder in forum General Discussion
    Replies: 35
    Last Post: 18th March 2006, 12:57
  4. Am I the only one with "make" error ?
    By probine in forum Installation and Deployment
    Replies: 1
    Last Post: 13th February 2006, 12:54
  5. qmake_image_collection.cpp gives me a compiling error
    By vfernandez in forum Qt Programming
    Replies: 2
    Last Post: 31st January 2006, 01:42

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.