QApplication: No such file or directory
-
Try including <QtWidgets/QApplication> if the hint from Zlatomir does not work.
-
If you are using Qt Creator, just go to "Build" and select "Rebuild All".
If you are on terminal, best clean the build dir, then run:
@
qmake
make
@ -
Hi,
In your pro file you have
@CONFIG -= qt@
that removes completely Qt from your project, just remove that line and run qmake again (depending on your Qt version you might need to add QT += widgets)
Hope it helps
-
[quote author="SGaist" date="1364159071"]Hi,
In your pro file you have
@CONFIG -= qt@ [/quote]
Hahaha! Amazing how nobody noticed that before! :D Nice catch, SGaist!
-
CONFIG contains qt by default, so no need to add it, just remove the "CONFIG -= qt" line from your pro file.
Including "QtWidgets" includes in fact All headers related to the QtWidget module, that's why it works. It's cleaner to only include what you currently uses i.e <QLineEdit> or if you want a clearer separation of modules in your include part <QtWidgets/QLineEdit>.