I am using Qt 4.5 in windows XP. I know we have to use Q_OBJECT macro for signal – slot connection mechanism. But besides that, is there are any other reasons to use the Q_OBJECT macro? I recently come to know that for some other meta-object features we require the Q_OBJECT declaration. What are those features beside the Signal-slots? I tried for documentation regarding that but couldn’t find anything helpful. Any pointers regarding this are welcome.
I am using Qt 4.5 in windows XP. I know we have to use
Share
You can find all you need to know about when Q_OBJECT macro is needed here:
http://doc.qt.digia.com/4.6/metaobjects.html
In resume you need it for signals and slots, to use tr for translation, to retrieve class name in real time from a QObject, to know if it inherits from other class (instrospection) to set properties and to be able to call newInstance.
Hope it helps.