Important: Please read the Qt Code of Conduct -

Communication between plugins and pluginmanager

  • Hi guys, I'm creating a kind of pluginmanager and a few plugins, each plugin has a method called login which is resposible to login to a different page, but I was wondering, what is the best way to communicate between the plugin > pluginmanager > the user? For instance, when a plugin fails to login, how can I know and tell the user that the login of a specific plugin failed?
    I know it will be signals and slots, but the thing is, the pluginmanager loads all the plugins using QPluginLoader call the method login of all plugins found in a loop, how would I know which plugin failed? how to connect between the plugin and the pluginmanager and the pluginmanager to the user?

  • Is there anyone to help me with that?

  • Lifetime Qt Champion


    Identify each plugin properly using e.g. objetName and use signals and slots to transmit the information both between the plugin and plugin manager as well as the plugin manager and the GUI.

  • Lifetime Qt Champion

    And please, practice some patience. Allow at least 24 hours before bumping your own thread. This forum is community driven and the people answering here don't necessarily lives in the same timezone as you.

  • @SGaist I'm sorry for that, it's that I posted this in a while and I went to do something else, I thought it had more time than it actually have.

  • Lifetime Qt Champion

    You can see the time elapsed besides your pseudonym on each post.

  • @SGaist Hi, according to the plug & paint example.
    the interface is a pure c++ class, not inherited from QObject.
    So how can i use connect() function to use slot and signal?

  • Lifetime Qt Champion

    @QtTester hi, make the implementation QObjects.

    Or make your plugin a factory with a method returning a subclass of whatever base (or rather abstract) class you want for your application.

Log in to reply