I've noticed that #include <QObject> doesn't seem to be necessary in the .h when you subclass QObject.
Is it included in all files associated with a .pro file, or is the Q_OBJECT macro responsible?
I've noticed that #include <QObject> doesn't seem to be necessary in the .h when you subclass QObject.
Is it included in all files associated with a .pro file, or is the Q_OBJECT macro responsible?
Last edited by ravas; 30th October 2015 at 17:49.
Maybe some other file includes it and you are including it not directly?
What files are you including to .h file of your QObject subclass?
ravas (31st October 2015)
I see one included file has <Qt>, <QtGlobal> and <QtPrintSupport/QPrinter>.
But I didn't see any mention of QObject in their documentation.
You get QObject indirectly through at least the QPrinter include.
There is no include file <Qt> I can see.
ravas (31st October 2015)
Bookmarks