Create QIcon in source code?
Solved
General and Desktop
-
Howdy QT folks, been checking the official docs and don't see this error mentioned. I have a class named App with app.h and app.cpp like this:
app.h
private: QIcon goSign; QIcon stopSign;
app.cpp
goSign = QIcon(":/res/images/goSign.png"); stopSign = QIcon(":/res/images/stopSign.png");
The error I get is:
goSign uses undefined class QIcon
stopSign uses undefined class QIconAny ideas what is going on? Appreciate the help.
-
Did you include the QIcon header?
#include <QIcon>
Is your project configured to be a gui application? See the QIcon documentation