Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
error: 'QMainWindow' file not found #include <QMainWindow> ^
AnnieChen last edited by AnnieChen
I'm using Qt.5.70 version and macOS 10.12.
I have an exist project that is created as C++ project. Then i find out that I need GUI, so I add New Qt Designer Form Class to create a GUI.
But when I try to build, there is an error:
/Users/zhijunchen/Dropbox/Wholesale-Clud/src/Wholesale-Club/mainwindow.h:8: error: 'QMainWindow' file not found
I have these in my .pro file already:
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
but still not working.
Can anyone help me please?
m.sue last edited by
maybe you just need to re-run qmake.
mostefa last edited by mostefa
I think that you need to add also widgets module in your .pro file
QT += widgets
If this not work for you , can tell us which qt version are you using?