QLabel class missing.
-
Hi, I have been coding in C++ for quite a while, but am new to Qt, just wrote a few apps following various tutorial materials. But at the moment, I seem to have a problem that I couldn't include the header file QLabel. I am using Qt creator 3.0, based on Qt 5.2.1., and it was an empty project.
relevant code is as follow, thanks for help!
#include <QLabel>
....
QLabel *label = new QLabel("....");
...The error after compilation simply goes as "QLabel: No such file or directory."
-
[quote author="IamSumit" date="1396586844"]hii and welcome to devnet,
in your .pro file add QT +=gui
hope it helps.
[/quote]In Qt5 the gui and core modules are "included by default":http://qt-project.org/doc/qt-5/qmake-variable-reference.html#qt
-
Hi,
It's because the widgets have been move to their own module in Qt 5