PDA

View Full Version : QWidget No such file or directory



Atomic_Sheep
14th October 2015, 09:55
Hmm... getting a compiler error for


#include <QWidget>

not sure why it can't seem to find this???

When I searched my computer I found a few qwidget.h files:

D:\QtSDK\Symbian\SDKs\Symbian3Qt473\include\Qt
D:\QtSDK\Symbian\SDKs\Symbian1Qt473\include\Qt
D:\QtSDK\Simulator\Qt\mingw\include\QtGui
D:\QtSDK\Desktop\Qt\4.7.3\mingw\include\Qt
D:\QtSDK\Maemo\4.6.2\sysroots\fremantle-arm-sysroot-20.2010.36-2-slim\usr\include\QtGui
D:\QtSDK\Maemo\4.6.2\sysroots\fremantle-arm-sysroot-20.2010.36-2-slim\usr\include\Qt

So it seems like I definitely have this header on my computer.

Lesiok
14th October 2015, 10:25
But qwidget.h and QWidget is not the same.

yeye_olive
14th October 2015, 10:51
If you use Qt 5, your .pro file needs

QT += widgets

Atomic_Sheep
14th October 2015, 12:11
I'm using 4.7.4.

Why are they not the same?

I'm:


#include <QWidget>

anda_skoa
14th October 2015, 12:51
I'm using 4.7.4.

If this is related to your other thread, then remove the


QT -= gui




Why are they not the same?

qwidget.h and QWidget are obviously not the same file, but they do both provide the same declarations.
(one is including the other).

Cheers,
_