[Interest] Qt4 QODBCDriver class and header file no longer in Qt5?

Karl Ruetz karl.ruetz at ruetzdogz.com
Wed Jul 31 16:15:23 CEST 2013


 

The binary installer does not automatically build or install the
database plugins. You either have to install Qt from source and specify
-qt-sql-odbc (built in) or -plugin-sql-odbc (plugin) to the configure
command OR you have to build the plugin manually after installing.
Instructions are here:
http://qt-project.org/doc/qt-5.0/qtsql/sql-driver.html#qodbc [1]. 

Karl


On 2013-07-31 07:24, Niels Dekker wrote: 

> Using Qt 4.8.4, we do:
>

> #include <QtSql/QODBCDriver>
> #include <QtSql/QSqlDatabase>
> ....
>
QSqlDatabase db = QSqlDatabase::addDatabase(new QODBCDriver);
> 
> This
code no longer compiled when we tried to upgrade from Qt 4.8.4 to 
> Qt
5.1 (using qt-windows-opensource-5.1.0-msvc2010-x86-offline.exe), 
>
because the <QtSql/QODBCDriver> header wasn't there anymore.
> 
> Has
the QODBCDriver class intentionally been removed from Qt 5, or did 
> we
possibly install Qt 5 incorrectly?
> 
> Kind regards,
> 
> Niels




Links:
------
[1]
http://qt-project.org/doc/qt-5.0/qtsql/sql-driver.html#qodbc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130731/5693f158/attachment.html>


More information about the Interest mailing list