In QML, QLabel: no such file or directory (solved)
I understand QML and Qt Widget are two different animals.
When i move a class (working fine in Qt Widget) to Qt QML. I added QT +=gui
when i build, i got error QLabel: No such file or directory
QLabel is part of QtWidgets
QT += widgets
Are you trying to create the GUI in QML and asking what you use instead of a QLabel? In QML you could just use a Text object for a label. It's hard to know exactly what you're doing when you say "move a class ... to Qt QML".
If you're new to QML you might benefit from my my latest Pluralsight course on "Qt Quick Fundamentals":bit.ly/qtquickfun on Pluralsight. Pluralsight is a subscription service but if you send me an email through the forum I can give you a free week long VIP pass good for unlimited hours of watching, including offline.