For a Qgis plugin I want to make a toolbar with additional buttons, which I want to dock on the vertically on left side beneath the add layers buttons I made the toolbar with in the a :
class Test: def __init__(self, iface): self.iface = iface def initGui(self): self.toolbar = self.iface.addToolBar("My tools") self.iface.addToolBar(self.toolbar, area=Qt.LeftToolBarArea)
To unload the plugin I used:
def unload(self): del self.toolbar
The toolbar is in the proper location, however when I unload the plugin it does not delete the toolbar. And when I reload it it creates an extra instance. So, I appear to have no way to unload the toolbar. I tried assigning a variable to the second addToolBar function but it returns None. Does anyone know of a solution?