I'm wondering if Qt (perhaps through the meta-object system) provides a mechanism to instantiate a QObject-derived object simply by specifying the type's name. The use case here would be to read a class' name from a configuration file and instantiate the appropriate type (without having messy if...else if...else logic). The QMetaObject documentation shows there is a newInstance() method, but that doesn't quite do what I'm looking for (i.e., creating an object from a string name).
Bookmarks