QT5: QApplication, no such file or directory

In QT5, when I use this: #include<QApplication>, QT tells :no such file or directory, even though it is all right for previous version of QT.

It turns out these files QApplication and so on have been moved to other places.

How to correct?

#include <QApplication> --------------------> #include <QWidgets/QApplication>

#include <QDialog> --------------------> #include <QWidgets/QDialog>

#include <QLabel> --------------------> #include <QWidgets/QLabel>

.....................blabla


when I do this, still there are some errors, I dunno...........


another way is to change the .pro file, make it adapt to qt4.


In QT gui, the application is necessary for a program, it is used for managing the program application resources.

posted @ 2016-03-28 14:17  phlsheji  阅读(585)  评论(0编辑  收藏  举报