error: QtGui/QApplication: No such file or directory
-
Hi i get error with this QtGui/QApplication i cant compile Nothing i tried to use widget but it is not useful. help me?
-
Hi i get error with this QtGui/QApplication i cant compile Nothing i tried to use widget but it is not useful. help me?
Hi @omardavinci, and welcome to the Qt Dev Net!
QtGui/QApplication
This is for Qt 4. It does not exist in Qt 5. Did you see this in a tutorial? If so, please use a newer tutorial
Anyway, you need to do 2 things:
- Change
#include <QtGui/QApplication>
to#include <QApplication>
- Add
QT += widgets
to your .pro file
- Change
-
Hi @omardavinci, and welcome to the Qt Dev Net!
QtGui/QApplication
This is for Qt 4. It does not exist in Qt 5. Did you see this in a tutorial? If so, please use a newer tutorial
Anyway, you need to do 2 things:
- Change
#include <QtGui/QApplication>
to#include <QApplication>
- Add
QT += widgets
to your .pro file
@JKSH Hi thx a lot one question about tutorial you refer a video tutorial or some guide? thx again
- Change
-
@JKSH Hi thx a lot one question about tutorial you refer a video tutorial or some guide? thx again
There is a porting guide
-
@JKSH Hi thx a lot one question about tutorial you refer a video tutorial or some guide? thx again
@omardavinci said:
@JKSH Hi thx a lot one question about tutorial you refer a video tutorial or some guide? thx again
I was not referring to a specific tutorial or guide. What I meant was this: If you saw
QtGui/QApplication
in a tutorial, that means the tutorial is too old so you shouldn't use it.Here is a newer one: http://doc.qt.io/qt-5/gettingstartedqt.html