Unsolved 58: error: QSqlRelationalDelegate: No such file or directory
-
Hello, I'm a new aspiring programmer in QT. I'm following the example books.
When I try build project I have this error:
.. \books\bookdelegate.h:58: error: QSqlRelationalDelegate: No such file or directoryIn file i have declare :
#include <QSqlRelationalDelegate>when i build i use C:\Qt\Tools\mingw530_32\bin\mingw32-make.exe
what is the problem?be patient, I'm a programmer but now I'm starting to study C ++ and QT.
Thanks
-
Do you have
QT += sql
in your project file (.pro)? -
Hi and welcome to devnet,
To add to @mchinand, don't forget to re-run qmake before building after adding
QT += sql
to your .pro file. -
Hi
A slightly longer story
When the Qt feature lives in a module
http://doc.qt.io/qt-5/qtmodules.html
Like SQL does.
The docs tells what to add to the project file. ( the . pro file )
for that class.
it looks like
qmake: QT += nameoften in big box.
- Also can be listed in top box like
- Also can be listed in top box like