Bug report #9504

iface.addToolBar but no iface.removeToolBar

Added by Richard Duivenvoorde almost 9 years ago. Updated about 7 years ago.

Category:Python plugins
Affected QGIS version:2.0.1 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:wontfix
Crashes QGIS or corrupts data:No Copied to github as #:18095


python iface has a method addToolBar, to add a toolbar with buttons.
But there is no way to remove the toolbar.

I've created a toolbar, with proper unload function. So disabling the plugin removes all from menu's, but I cannot remove the toolbar.
Which would be ok, if not a second one pops up when you enable the plugin again.


#1 Updated by Jürgen Fischer almost 9 years ago

You can delete the toolbar.

#2 Updated by Alexander Bruy about 7 years ago

  • Resolution set to wontfix
  • Status changed from Open to Closed

As Jürgen said, you can delete toolbar. Please reopen if necessary

#3 Updated by Richard Duivenvoorde about 7 years ago

Just as information for future reference for others:

  # remove a toolbar (eg in unloading a plugin with a toolbar)
  del self.toolBar

see http://www.mail-archive.com/qgis-developer%40lists.osgeo.org/msg20206.html

Also available in: Atom PDF