How to get class name?

前端 未结 6 1363
萌比男神i
萌比男神i 2020-12-15 08:51

If I defined a class:

class Blah {};

How can I:

std::string const className = /* What do I need to do here? */;
assert( cla         


        
6条回答
  •  清歌不尽
    2020-12-15 09:43

    The QObject->metaObject() method is valid for Qt except the QGraphicsItem based classes that not inherit from QObject...

提交回复
热议问题