Hello everyone, Basically, I have a file which I do save some QObject-derived instances states. I do save them to be able to use those to recover the states of those QObject-derived instances.
I do also save the QMetaObject::className() in the file. And at the run-time, I would like to dynamically create QObject-derived instances from the file. After a short research on the qt docs, I have ended to use QMetaType::create() but after tried it, it failed because of this was not for QObject.. So finally I got the point, QMetaObject is for QObjects and QMetaType for the others.. But could not find a propert QMetaObject API to create an instance from string.. Also there is stackoverflow question <http://stackoverflow.com/questions/7872578/how-to-properly-use-qregistermetatype-on-a-class-derived-from-qobject> but the answers are not seems like so elegant. So I have decided to ask your advices how to create QObject-derived class instance dynamically from a string or class name, even with my that terrible english, I hope you don't mind it. Thank you, Sina
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest