error: 'QMainWindow' file not found #include <QMainWindow> ^
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?
maybe you just need to re-run qmake.
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?