SPlatten
SPlatten

Reputation: 5760

How to get class name from static method?

I'm programming with Qt5.9. When in a NON static method I can get the class name using:

    metaObject->className();

Is it possible to get the class name when in a static method?

Upvotes: 0

Views: 536

Answers (1)

Murphy
Murphy

Reputation: 3999

QObject::staticMetaObject should do the trick.

Upvotes: 2

Related Questions