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. Adding configurations to plugins
QtWS25 Last Chance

Adding configurations to plugins

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 653 Views
  • 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.
  • D Offline
    D Offline
    Defohin
    wrote on last edited by
    #1

    Hi, I'm trying to create a software with support for plugins and I've been reading the examples that comes with Qt but none of them has a "way" to create "configurations" to plugins? I want each plugin to have different configurations.
    You know I will probably list the plugins in a window, I don't know if it's better to add a gui configuration to each one or what, but I'm asking because I have no idea.

    raven-worxR 1 Reply Last reply
    0
    • D Defohin

      Hi, I'm trying to create a software with support for plugins and I've been reading the examples that comes with Qt but none of them has a "way" to create "configurations" to plugins? I want each plugin to have different configurations.
      You know I will probably list the plugins in a window, I don't know if it's better to add a gui configuration to each one or what, but I'm asking because I have no idea.

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

      @Defohin
      since you write the plugins yourself you could add an interface method that returns the configuration.
      For example this could be a JSON string, which specifies the options and it's types. Then the application creates the GUI according to it.
      Or let the plugin return a QWidget* which contains has all configuration widgets already layed out. Then the application simply needs to embedd it in some of it's views.
      You can use QSettings to store the set options locally on the machine.

      --- 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
      • BuckwheatB Offline
        BuckwheatB Offline
        Buckwheat
        wrote on last edited by
        #3

        @Defohin
        @raven-worx has the right approach. Plugins are very easy and can be part of your application in as abstract or integrated as you need.

        If you are want to let the plugin conatain and show the configuration UI, you can also just pass a pointer to your QSettings class and the pointer to your the parent to the plugin and it can create its own section. I, myself, have used a mixture. Especially if my settings is a book or tree-style interface. Then just add the UI widget!

        Dave Fileccia

        1 Reply Last reply
        0

        • Login

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