[Qt-interest] classname to metaobject
Imre Péntek
pentek.imre at gmail.com
Mon Jul 27 14:21:21 CEST 2009
Hello,
Is there any way to get a metaobject corresponding to a given string (as a
classname)?
e.g. is there any_function which would work like this:
any_function("QObject")==QObject::staticMetaObject;
or similarily
QObject *x=...;
any_function(x->metaObject().className())==x->metaObject();
and similarily:
QString x="QPushButton"; //or any other classname
any_function(x).className()==x;
Thank you in advance.
--
With Regards: Imre Péntek
E-Mail: pentek.imre at gmail.com
More information about the Qt-interest-old
mailing list