Bug report #9504

iface.addToolBar but no iface.removeToolBar

Added by Richard Duivenvoorde over 6 years ago. Updated over 4 years ago.

Status:Closed
Priority:Normal
Assignee:-
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

Description

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.

History

#1 Updated by Jürgen Fischer over 6 years ago

You can delete the toolbar.

#2 Updated by Alexander Bruy over 4 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 over 4 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