[Qt-interest] Extending applications with plugins (QPluginLoader)

Bastian Bense bastibense at gmail.com
Wed Aug 12 16:06:15 CEST 2009


Thanks for the response.
Unfortunately this does not solve the problem of accessing the host
application's objects from the plugin.

How would I conveniently call code/functions in the host application
from the plugin?

2009/8/12  <GZimmermann at t-systems.com>:
> Hi,
>
>>Some expected behaviour of a plugin backend would be something like this:
>>A plugin is installed and provides additional commands for the network
>>protocol. To properly handle this, the plugin needs to access the
>>application's socket and call functions and properties.
>
> You should probably do it the other way round:
>
> - Provide an interface that has something like callNetworkProtocolExtension()
> - call the defined method for all plugins regularly
>
> Did something similar for a project, works like a charm. This won't do if you need a direct response to click events or something comparable, though, but it should be possible to do use a "public slot callNetworkProtocolExtension()" for this, IIRC.


-- 
Best regards,
Bastian Bense



More information about the Qt-interest-old mailing list