Qt SDK 2009.03 already has built and functional QODBC driver support out-of-the-box.
Qt SDK 2010.02.1 already has built and functional QODBC driver support out-of-the-box.
I have deployed ODBC-using applications using both of the above without ever rebuilding any part of Qt on Windows.
The copy of Qt SDK 2010.04 I just downloaded has ODBC support built out-of-the-box. Open Windows Explorer, navigate to your equivalent of "C:\Qt\2010.04\qt\plugins\sqldrivers", observe qsqlodbc4.dll and qsqlodbcd4.dll.
#include <QtCore>
#include <QtSql>
#include <QDebug>
int main(int argc, char *argv[])
{
return 0;
}
#include <QtCore>
#include <QtSql>
#include <QDebug>
int main(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
qDebug() << QSqlDatabase::drivers();
return 0;
}
To copy to clipboard, switch view to plain text mode
and its output:
Starting C:\temp\debug\temp.exe...
("QSQLITE", "QODBC3", "QODBC")
Starting C:\temp\debug\temp.exe...
("QSQLITE", "QODBC3", "QODBC")
To copy to clipboard, switch view to plain text mode
No amount of you repeating that Qt SDK doesn't include ODBC out-of-the-box will make it so.
Bookmarks