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. Can I unload plugin without QPluginLoader?

Can I unload plugin without QPluginLoader?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.5k Views 1 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.
  • G Offline
    G Offline
    Gourmand
    wrote on last edited by
    #1

    Once I download plugin it is registered by Qt internal plugin manager and QPluginLoader can be deleted. But if I need unload plugin - I need QPluginLoader again cause cannot not find any other option to unload. Is there any access to plugin manager or I have to create QList of all QPluginLoader objects to be able unload any plugin.

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      QPluginLoader is the way. If it is used by somebody else or if the plugin has reference by some other QPlugiLoader, you can't unoad it. If you are sure that nobody has reference, you can just load again to get the reference and unload it.

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply
      0
      • G Offline
        G Offline
        Gourmand
        wrote on last edited by
        #3

        I cannot even unload plugin which was loaded only once. And I do not see way how to know who uses it. What does this mean "somebody else uses plugin"? Does this mean it's root object owner is non-zero or something else? I cannot find how explain this in plugins doc.

        1 Reply Last reply
        0
        • G Offline
          G Offline
          Gourmand
          wrote on last edited by
          #4

          Yep... After setParent(0) to QPluginLoader object the plugin unloads successfully.

          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