[Interest] Qt4 QODBCDriver class and header file no longer in Qt5?
Sergio Ahumada
sergio.ahumada at digia.com
Wed Jul 31 16:24:42 CEST 2013
On 07/31/2013 03:24 PM, 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
>
Hi,
I think those headers were made private in Qt 5.1 (they were public by
mistake).
Anyways, what if you do something like:
QSqlDatabase db = QSqlDatabase::addDatabase("QODBC");
Cheers,
--
Sergio Ahumada
Release Engineer - Digia, Qt
More information about the Interest
mailing list