Hello,

while it is quite clear how to write an interface so that the application can interact with the plugin by calling some of it member functions, I would like to now how I can have the plugin interacting with the application by letting him call some member functions declared in the application.

The following code shows how the application could display some message in the plugin by having the application calling a member function of the plugin.

Qt Code:
  1. class MyInterface
  2. {
  3. public:
  4. virtual ~MyInterface() {}
  5. virtual QString displayInPlugin(const QString &message) = 0;
  6. };
  7.  
  8. Q_DECLARE_INTERFACE(MyInterface, "myApplication/1.0");
To copy to clipboard, switch view to plain text mode 

Now I am looking for the other way around, give the plugin the possibility to call a member function of the application.