0
votes

I am trying to use the DB2 SQL support in Qt 5.

The latest Qt source was cloned from Git and built using the directions at http://doc.qt.io/qt-5/windows-building.html

The DB2 driver was built with the directions at http://http://doc.qt.io/qt-5/sql-driver.html#qdb2

This resulted in qslqdb2.dll and qsqldb2d.dll which I copied over to my installed QtCreator at d:\qt-open\Tools\QtCreator\bin\plugins\sqldrivers

But when I run d:\qt-open\Tools\QtCreator\bin\qtcreator and execute m_db = QSqlDatabase::addDatabase("QDB2"); it fails and reports QSqlDatabase: QDB2 driver not loaded QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL

I would have run QtCreator from the source build I just did but there is no qtcreator.exe built.

1
When you build Qt, you don't build Qt Creator, it's a separate tool that you can build once you've built Qt.Kuba hasn't forgotten Monica

1 Answers

2
votes

Qt Creator is just an IDE. Adding SQL plugins to Qt Creator's plugins folder is pointless, unless you want Qt Creator to use these plugins itself.

You need to add the plugins to your Qt's installation folder.