[Qt-interest] Extending applications with plugins(QPluginLoader)
GZimmermann at t-systems.com
GZimmermann at t-systems.com
Thu Aug 13 10:16:39 CEST 2009
Hello,
probably I wasn't clear ... what I meant was: even if you can you shouldn't.
The only result would be that you get an insecure, unstable application - at least if you aren't the only one writing plugins.
Regards,
Gerrit
-----Ursprüngliche Nachricht-----
Von: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] Im Auftrag von Bastian Bense
Gesendet: Mittwoch, 12. August 2009 16:06
An: qt-interest at trolltech.com
Betreff: Re: [Qt-interest] Extending applications with plugins(QPluginLoader)
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
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
More information about the Qt-interest-old
mailing list