[Solved] QMetaObject::className for derived type
-
Hello
I have the following situation. I have a base class called ABase which derives from QObject and I have several classes which derives from ABase. now I want to get type name of those classes derived from ABase. For this, I tried obj.metaObject()->className(), but it returns the name of ABase, not of the derived class. So my question is, is there a way to get type name of the derived class?
I know Q_CLASSINFO macro is a solution, I can name all classes, but I want to avoid that.Thanks