> > Then the plugin will derive from one of the DerivedX classes, and provide > a method in the interface which will list its implemented derived class > names as strings, and provide a factory for them returning Base* objects. > > Then, the app will dynamic_cast these pointers to DerivedA, DerivedB, > etc... > > Will the dynamic_cast work? Is there a special way to export/declare > things for that? >
Do you have specific requirements, which prevent you from using Qt's plugin system entirely or do you have to use the string approach? You could load the plugin with QPluginLoader and test whether it implements a given interface by using qobject_cast(). See http://qt-project.org/doc/qt-4.8/plugins-howto.html#the-lower-level-api-extending-qt-applications for details. Not sure if one single plugin can export more than one interface though, but I hope so :)
_______________________________________________ Interest mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/interest
