Results 1 to 7 of 7

Thread: MySql and QtPlugin

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: MySql and QtPlugin

    Quote Originally Posted by darksaga View Post
    Hello,

    Today i've tried to use my mysql db, instead of the sqlite db i used so far.
    PS: using QT::4:2:2 and Visual Studio 2003

    can you see the mysql driver on

    %QDIR%\demos\sqlbrowser\release ?

    i put only QT += sql on my pro file and all run on qt4.3 beta

  2. #2
    Join Date
    Jan 2007
    Posts
    68
    Thanks
    9
    Thanked 8 Times in 8 Posts

    Default Re: MySql and QtPlugin

    Quote Originally Posted by patrik08 View Post
    can you see the mysql driver on

    %QDIR%\demos\sqlbrowser\release ?

    i put only QT += sql on my pro file and all run on qt4.3 beta
    it's just the QODBC & QSQLITE driver that the driver combobox shows if i run the demo.

    i used the QT += sql flag from the start in my project....

    i know there is an option that compiles the mysql driver during your first "installation (compilation)".

    maybe you used that flag, i didn't.

  3. #3
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: MySql and QtPlugin

    Quote Originally Posted by darksaga View Post
    it's just the QODBC & QSQLITE driver that the driver combobox shows if i run the demo.
    i used the QT += sql flag from the start in my project....
    .
    You qt4 installation dont have mysql ... otherwise on %QDIR%\demos\sqlbrowser\release textfield driver mysql is visible!

    Move your visual compiler to Trash if visual studio is to hard to handle .. and begin on mingw compiler http://www.mingw.org/ ....

    After you have get compiler.... and minimal sys.. (like a linux console emulator you can compile all)
    cd dir libmysql.lib
    Qt Code:
    1. reimp -d libmysql.lib
    2. dlltool -k --input-def libmysql.def --dllname libmysql.dll --output-lib libmysql.a
    3. dlltool --input-def libmysql.def --dllname libmysql.dll --output-lib c:\MingW\lib\libmysql.a
    To copy to clipboard, switch view to plain text mode 

    now put mysql include to mingw include dir and run..

    version qt4.3 ...
    Qt Code:
    1. configure -qt-sql-mysql -qt-sql-odbc -qt-sql-sqlite -qt-gif -qt-tif -qt-libpng -qt-libjpeg
    2. make
    To copy to clipboard, switch view to plain text mode 

    cd to %QDIR%\demos\sqlbrowser\release and you can see mysql driver work...
    Visual studio have to much option and button ... and confusion ...
    I have all two compiler on two pc ... but 90% i work only on mingw ... is more easy...

Similar Threads

  1. Statically compiled Qt 4.1.4 and mySql
    By Djony in forum Installation and Deployment
    Replies: 1
    Last Post: 26th January 2007, 07:13

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
  •  
Qt is a trademark of The Qt Company.