Apologies for the necro-posting but since this is one of the top google hits:
http://comments.gmane.org/gmane.comp.lib.qt.user/5256
>> The real point is: is there some 'magic' qmake flag or something else
>> used in qnamespace.h for having
>> that working properly ?
>
> Yes, there's magic hardcoded in moc and in QMetaObject:roperty.
src/tools/moc/moc.cpp:653:
Qt Code:
if (def.classname != "Qt" && def.classname != "QObject" && def.superclassList.isEmpty()) error("Class contains Q_OBJECT macro but does not inherit from QObject");To copy to clipboard, switch view to plain text mode
Bookmarks