QApplication: No such file or directory
-
Try including <QtWidgets/QApplication> if the hint from Zlatomir does not work.
-
Im not sure how to run a make file. I see numerous references oin the net and in the textbookIm using but not a step by step process on how to execute it?
-
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
@ -
Same error persists. "No such file or directory"
-
Are you using Qt Creator ide? If so make sure you added QT += widgets in your .pro file, than click run qmake (from the Build menu) and than build.
-
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!
-
In QT 4.8.0, you need to include #include <QtGui/QApplication> for 5.0.1 you need to include <QtWidgets/QApplication>
-
Hi guys
Solved:
I included:
@
QT += widgets
CONFIG += qt
@ under .pro fileThen to recogsnise widgets I used
@#include <QtWidgets>@
under the file that uses widgetsDont know if this makes sense as to why it works but it works...
-
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>.