Hi Friends
Exactly what is Q_Object?
thanks.
Hi Friends
Exactly what is Q_Object?
thanks.
It is a C++ preprocessor macro that has two complimentary features:
1) the C++ preprocessor expands it into code, mainly function declarations, see qgobals.h
2) it serves as a marker for the MOC code generation tool, which generates the implementation of these functions (and some a meta data object for the class)
It is needed for QObject derived classes that declare their own signals and slots or their own Qt properties (using the Q_PROPERTY macro).
Cheers,
_
rezas1000 (9th August 2014)
Bookmarks