In QGIS, with right-click
somewhere in the toolbar area panels can be toggled on/off like shown in the screenshot below (the GPS Information Panel for instance).
I need to do this programmatically, so how to toggle on/off panels from PyQgisPyQGIS? I found that the QgsInterface
class has some addDockWidget
and removeDockWidget
method, but I really couldn't figure out if this is the right way to achieve this ...