main.cpp
#include <QApplication>
#include <QPushButton>
int main(int argc, char *argv[]){
QApplication app(argc, argv);
QPushButton qPushButton("Hello Qt");
qPushButton.show();
return app.exec();
}
You will be reported with error of:
QApplication: No such file or directory
QPushButton: No such file or directory
To fix it: Edit HelloQt.pro to add the code QT+=widgets.
QT+=widgets
SOURCES += \
main.cpp