I work in a project where the Q_OBJECT macro is used in a class that I need to inherit.
The class in which Q_OBJECT is already defined looks like this:
class cBaseObject : public QObject, public cinformation
{
Q_OBJECT
}
I am creating a new class through cBaseObject public inheritance. Should I write the Q_OBJECT macro again? I tried with and without this macro, and I see that the moc_XXX.cxx file is not created unless I include QT_MACRO
class cEnhancedbaseObject : public cBaseObject
{
Q_OBJECT
}
But when I inherit the class, why the functionality of the Q_OBJECT macro is also not inherited. Is this a problem if the Q_OBJECT macro is defined twice, if it is inherited? Like the Q_OBJECT behavior for multi-level inheritance. I read that for multiple inheritance, the QOBJECT class must be selected first. Is there something similar for multi-level inheritance.