pkj
4th June 2011, 07:39
Hi,
Suppose class A subclasses QObject and class B subclasses class A. Now if i store class B pointer in QObject * obj and call obj->MetaObject(), the metaObject I receive contains metatype information of class A and nothing of class B. Can I drill down information of class B with the class hierarchy I have, or class B must inherit from QObject directly if I am to see into metaobject properties of class B. I see that QObject::MetaObject() is virtual. Will reimplementing it in class B help?
Suppose class A subclasses QObject and class B subclasses class A. Now if i store class B pointer in QObject * obj and call obj->MetaObject(), the metaObject I receive contains metatype information of class A and nothing of class B. Can I drill down information of class B with the class hierarchy I have, or class B must inherit from QObject directly if I am to see into metaobject properties of class B. I see that QObject::MetaObject() is virtual. Will reimplementing it in class B help?