You are not logged in.

kus_hal03

Beginner

  • "kus_hal03" is male
  • "kus_hal03" started this thread

Posts: 1

Location: Nagpur,Maharashtra, India

Occupation: Software Engineer

  • Send private message

1

Saturday, May 28th 2011, 6:25am

QT connectivity with MySQL

Hello Friends,
I have database in MySQL, which I want to connect using qt4.6 but I am getting error that I have only QSQLITE, but I want it to be connected using QMYSQL, So I am getting driver of mysql to connect with qt. Please help me.. If any one having driver regarding QMYSQL please tell me the link or mail me on kus_hal03@hotmail.com

Thanks

tomasstr

Beginner

  • "tomasstr" is male

Posts: 35

Location: Vilnius, Lithuania

  • Send private message

2

Sunday, June 19th 2011, 9:14am

You didn't tell which OS are you using.

On linux it is simple, just type something like:

Source code

1
yum install qt-mysql


On windows it is much more complicated, you will probably have to compile mysql drivers from qt source...

creatron

Beginner

  • "creatron" is male

Posts: 7

Location: South Africa, Midrand

Occupation: Senior Hardware Eng

  • Send private message

3

Sunday, June 19th 2011, 5:21pm

QT connectivity with MySQL

If you use QtCreator you need a plug-in. A easy way is to install the mysql driver from the system (Suse Yast, Ubuntu synatic package manager etc) and then copy the so file from /usr/lib/qt4/plugins/sqldrivers/ to /opt/'qtsdk dir'/qt/plugins/sqldrivers ( the file are libqsqlpsql.so) Your directory could be different.

Similar threads

Used tags

MySql, QT 4.6