I am trying to define some macro for RTTI identification to get some class info, such as class name and base class name for object reconstruction. The class is derived from QGraphicsItem.
For instance:
Qt Code:
... }To copy to clipboard, switch view to plain text mode
I need some macro so I can do
obj->getClassName() // return "MyGraphicsItem"
or
obj->getBase()->getClassName() // return "QGraphicsItem"
How do I define those macros and how to use it?
Many thanks
Bookmarks