Q_OBJECT macro appears in private section of a class. Q_OBJECT requires the class to be subclass of QObject. This macro is necessary for the class to declare its signals/slots and to use Qt meta-object system.
If Meta Object Compiler (MOC) finds class with Q_OBJECT, it processes it and generates C+...