[Interest] QPlugin and RTTI
Etienne Sandré-Chardonnal
etienne.sandre at m4x.org
Wed Jun 18 15:20:03 CEST 2014
Hi,
I would like to implement a plugin system in my app and I'm totally
ignorant of dynamic library mechanisms. So I'm trying with a QPlugin. I'm
using Qt 4.8.5, gcc 4.8.0 mingw64.
The question is : can RTTI work between the plugin and the app?
I will define and include these headers in both the app and the plugin:
- A base class Base which will be pure virtual
- A few DerivedA, DerivedB classes which will be pure virtual, too.
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?
Thanks,
Etienne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140618/a80abe70/attachment.html>
More information about the Interest
mailing list