Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Plugin manager with the option to enable and disable
Forum Updated to NodeBB v4.3 + New Features

Plugin manager with the option to enable and disable

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 3 Posters 1.6k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mr Gisa
    wrote on last edited by
    #1

    I'm studying in order to create a plugin manager, where I list all the plugins in a list view and create a custom delegate to draw a checkbox to enable and disable a plugin.
    I'm only studying codes and I figured a few things out but there's something that is kinda hard for me to understand right now.
    The plugin manager uses QPluginLoader and the method load, but I was wondering if the method unload is going to be necessary here in order to disable a plugin when the user hits the checkbox to disable a plugin.
    What would be the best approach to create something like this? If I call unload I will have to call load again right? Is it really necessary or I can create something that I don't actually need to unload but only disable?
    If you have open source softwares using Qt that uses any plugin manager approach, please send me so I can study the source code and understand a little but, it doesn't need to have every single feature, any code will come in handy.

    raven-worxR 1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Qt Creator is such an application.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2
      • M Offline
        M Offline
        Mr Gisa
        wrote on last edited by
        #3

        Yes, you are right, it should help, I'll be looking into Qt Creator's source code.

        1 Reply Last reply
        0
        • M Mr Gisa

          I'm studying in order to create a plugin manager, where I list all the plugins in a list view and create a custom delegate to draw a checkbox to enable and disable a plugin.
          I'm only studying codes and I figured a few things out but there's something that is kinda hard for me to understand right now.
          The plugin manager uses QPluginLoader and the method load, but I was wondering if the method unload is going to be necessary here in order to disable a plugin when the user hits the checkbox to disable a plugin.
          What would be the best approach to create something like this? If I call unload I will have to call load again right? Is it really necessary or I can create something that I don't actually need to unload but only disable?
          If you have open source softwares using Qt that uses any plugin manager approach, please send me so I can study the source code and understand a little but, it doesn't need to have every single feature, any code will come in handy.

          raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by
          #4

          @Mr-Gisa said in Plugin manager with the option to enable and disable:

          What would be the best approach to create something like this? If I call unload I will have to call load again right? Is it really necessary or I can create something that I don't actually need to unload but only disable?

          it's up to you. You can unload it or 'disable' it by simply not using the the interface provided by the plugin in your application.

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          M 1 Reply Last reply
          2
          • raven-worxR raven-worx

            @Mr-Gisa said in Plugin manager with the option to enable and disable:

            What would be the best approach to create something like this? If I call unload I will have to call load again right? Is it really necessary or I can create something that I don't actually need to unload but only disable?

            it's up to you. You can unload it or 'disable' it by simply not using the the interface provided by the plugin in your application.

            M Offline
            M Offline
            Mr Gisa
            wrote on last edited by
            #5

            @raven-worx Like creating a setting for each plugin and one called "enabled" and before usnig it I check if it's true or not, right?
            I think that the "unload" is kinda overhead cause I would need to load again in the memory, idk.

            raven-worxR 1 Reply Last reply
            0
            • M Mr Gisa

              @raven-worx Like creating a setting for each plugin and one called "enabled" and before usnig it I check if it's true or not, right?
              I think that the "unload" is kinda overhead cause I would need to load again in the memory, idk.

              raven-worxR Offline
              raven-worxR Offline
              raven-worx
              Moderators
              wrote on last edited by raven-worx
              #6

              @Mr-Gisa said in Plugin manager with the option to enable and disable:

              @raven-worx Like creating a setting for each plugin and one called "enabled" and before usnig it I check if it's true or not, right?

              yes, something like that.
              I wouldn't "overcomplicate" it.

              Depending on the count and size of the plugins you could also load all found plugins beforehand to quickly en-/disable them during runtime.

              --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
              If you have a question please use the forum so others can benefit from the solution in the future

              1 Reply Last reply
              2

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved