Important: Please read the Qt Code of Conduct -

Keeping content of plugin without loading the plugin

  • Hello
    I've the following requirements:
    The application has a set of functions defined in plugins.
    The functions are loaded on demand, meaning dynamically (when needed).
    However, in the application GUI (let's say a toolbar), i'd like to display functions properties (let's say an icon attached to the function) which actually are stored within the plugin.
    In short, i'd like to display objects stored in a plugin without loading the plugin.
    Of course, if the developer modifies the plugin (i.e. modifies the icon in the plugin), the application should be informed and the icon representing the unloaded plugin should be updated in the application.

    My idea was to load the plugin the very first time the application is launched, and to store the persistent information (icon) in the application (probably with QSettings).
    Then, each time the application starts, I just check if the plugins have been modified or not. If not, I use the icons stored in the settings. If Yes, I reload the modified plugin, update the settings, unload the plugin and use the updated Icon.

    Now the problem : how can I check if the plugin has changed or not: Do I have to create my own class "PluginManager", responsible for timestamps checking?
    Or is there a ready to use Qt solution = a Qt class implementing a solution?

    Thanks in advance for your answers

  • I know no implem,entation for that. So my guess is you have to create your own plugin manager for that.

    Plugins in genereal can be done in Qt. But this storing of data and update on new files is not done there.

Log in to reply