Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. [Solved] Qt Creator plugins. ExtensionSystem :: IPlugin :: removeObject()

[Solved] Qt Creator plugins. ExtensionSystem :: IPlugin :: removeObject()

Scheduled Pinned Locked Moved Qt Creator and other tools
3 Posts 2 Posters 2.5k 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
    DSav
    wrote on last edited by
    #1

    I’m working on a plugin for Qt Creator and have faced the following problem.

    There’s Core::IOutputPane subclass (say, OutputPane) implemented because the plugin needs to show some data in a output pane. The instance of OutputPane is added to plugin manager’s pool in Plugin::initialize() using IPlugin::addObject(). However if the user changes plugin options I need to hide the pane when the Qt Creator is running. I’m trying to do this with IPlugin::removeObject() but it won’t work. If I, however, add the pane and immediately remove it from the pool within Plugin::initialize(), then the pane is hidden.

    Does it mean that IOutputPane instances can be only added or removed while a plugin is initializing?

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on last edited by
      #2

      Once something is initialized an object may be in use somewhere (e.g. in the combobox to select a output view, etc.), so removing it will generally not work. In general we do not support removal of objects anywhere in Qt Creator (with the exception of application shutdown of course:-)

      1 Reply Last reply
      0
      • D Offline
        D Offline
        DSav
        wrote on last edited by
        #3

        Yes, I was suspecting this, espessialy after looking through PluginManager and PluginManagerPrivate sources. Thanks a lot for confirmation.

        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