Cannt connect to mysql in QT 4.7.2
-
hi
im beginner in QT!!!
and i have a problem with connecting to mysql
i install offline QT and use ubuntu 11.04when run my program, show this error:
bq.
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITEWhat should I do?
please step by step!!! -
Hello, ~vahidsamimi!
You should have problems with drivers. Your error log tells that you only have QSQLITE driver for databases. If you want to have QMYSQL driver - you must have it in your Qt.
The best solution is to configure Qt (build sources) in this way:
@
./configure <some keys> -qt-sql-mysql
@ -
hi tucnak
thanks for your answer
but how can i configure QT!!!???
can you tell a example ??? -
You should to download Qt Sources, configure and build them. Or you can download Qt SDK - it has QMYSQL driver in defaults.
-
but i downloaded QT SDK from here:
http://qt.nokia.com/downloads/sdk-linux-x11-64bit-cpp-offlinebut it has not QMYSQL driver in defaults!
-
Oh, sorry. I said wrong thing.
== SOLUTION ==
- Download Qt 4.8.2 sources
- Extract them to some dir
- Read README
- When you will be on step "Configure" - configure it with keys you need + "qt-sql qt-sql-mysql"
- ?????
- PROFIT!!1
-
hi
i downloaded QT 4.8.2 source and installed this!!!
but i have a question!
how can i running QT 4.8.2?!!
where is qtcreator file?