[Qt-interest] Meta Object for Class Name?

Josiah Bryan jbryan at productiveconcepts.com
Wed Nov 11 19:02:57 CET 2009


Is there a way to get the meta object for a class given the class name 
(assuming its a QObject, of course.)

Ideally, I'd like to be able to construct a class just from its name, say:

FooBar *foo = (FooBar*) QMetaObject::defaultConstructor("FooBar");

Is that pie-in-the-sky or is that somehow possible?

Thanks!
-josiah

-- 

-=-=-=-=-=-=-=-=-=-=-=-=-
Josiah Bryan
Productive Concepts, Inc.
jbryan at pciint.com
(765) 964-6009, ext. 224




More information about the Qt-interest-old mailing list