Results 1 to 8 of 8

Thread: MySQL and QT

  1. #1
    Join Date
    Jun 2007
    Posts
    18
    Thanks
    2

    Default MySQL and QT

    Hello:

    I have mysql 5.x and QT 4.x installed on Suse Linux. I would like to access mysql through QT. I searched for a solution on the web but haven't found a satisfactory one.

    I tried the following code:

    Qt Code:
    1. #include <QCoreApplication>
    2. #include <QtSql>
    3.  
    4. int main(int argc, char *argv[])
    5. {
    6. QCoreApplication a(argc, argv);
    7.  
    8. qDebug() << QSqlDatabase::drivers();
    9.  
    10. return a.exec();
    11. }
    To copy to clipboard, switch view to plain text mode 
    but got the output as:

    ("QSQLITE",QPSQL7","QPSQL")


    would apreciate any help.
    Last edited by wysota; 15th March 2011 at 16:10. Reason: missing [code] tags

  2. #2
    Join Date
    Oct 2010
    Location
    Belarus
    Posts
    71
    Thanks
    1
    Thanked 9 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Windows Maemo/MeeGo

    Default Re: MySQL and QT

    do you create qt plugin for mysql?
    Try read Qt documentation before ask stupid question.

  3. #3
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: MySQL and QT

    You may be interested in this thread : link
    Have you tried to search the forum for "MySQL" ? There are many, many threads on this subject.

  4. #4
    Join Date
    Jun 2007
    Posts
    18
    Thanks
    2

    Default Re: MySQL and QT

    unit: With reference to your comment: "Try read Qt documentation before ask stupid question."
    please do not be rude.

  5. #5
    Join Date
    Oct 2010
    Location
    Belarus
    Posts
    71
    Thanks
    1
    Thanked 9 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Windows Maemo/MeeGo

    Default Re: MySQL and QT

    It's not comment. it' only signature to all my posts.
    Try read Qt documentation before ask stupid question.

  6. #6
    Join Date
    Mar 2011
    Location
    Coimbatore,TamilNadu,India
    Posts
    382
    Thanks
    10
    Thanked 13 Times in 12 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: MySQL and QT

    Don't think there are no crocodiles because the water is calm.

  7. #7
    Join Date
    Jul 2010
    Posts
    72
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt/Embedded Qt Jambi
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: MySQL and QT

    Very interesting.
    I have the same problem when I need to access MySQL database from Qt application on Windows
    There is no MySQL database support ( through plugin dll as it is at Qt ) , no MySQL plugin in LGPL Qt version
    Where to get mysqlplugin.dll for database support? Where to get souce codes or dll file for MySQL support.
    When no MySQL plugin I've used QT - MYSQL -ODBC bridge on windows to access the database
    Pavel

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: MySQL and QT

    You need the plugin available and you also need MySQL libraries available as the plugin depends on them.
    Last edited by wysota; 15th March 2011 at 16:32.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. I need MySQL driver for Qt 4.6, WindowsXP(32), MySQL 5.1
    By User_3 in forum Installation and Deployment
    Replies: 7
    Last Post: 15th October 2010, 16:19
  2. MySQL
    By Fallen_ in forum Qt Programming
    Replies: 1
    Last Post: 15th September 2010, 06:39
  3. Qt with MySQL
    By FoleyX90 in forum Qt Programming
    Replies: 2
    Last Post: 22nd July 2010, 16:42
  4. Qt with MySql
    By lyucs in forum Qt Programming
    Replies: 3
    Last Post: 16th July 2010, 23:27
  5. MYSQL 5 Table qt model as small Mysql admin
    By patrik08 in forum Qt-based Software
    Replies: 0
    Last Post: 1st May 2007, 10:43

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.