Qt 5 beta include files not found
Cannot open include file: 'QMainWindow': No such file or directory
I get these errors in projects which were originally 4.8. If I make a completely new project with new sources, it works correctly. Any solutions?
In Qt 4.8, widgets were in the Qt GUI module. In Qt 5, they have moved to their own Qt Widgets module.
Add this to your .pro file to load the Qt Widgets module (where QMainWindow now lives):
QT += widgets
All the modules moved from QtGui to QtWidgets.
So you most likely need to add Qt += widgets into your .pro-file.