Skip to main content
consistent writing of PyQGIS
Source Link
Jochen Schwarze
  • 14.9k
  • 8
  • 54
  • 120

Programmatically turn on/off panels with PyQgisPyQGIS

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).

enter image description here

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 ...

Programmatically turn on/off panels with PyQgis

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).

enter image description here

I need to do this programmatically, so how to toggle on/off panels from PyQgis? 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 ...

Programmatically turn on/off panels with PyQGIS

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).

enter image description here

I need to do this programmatically, so how to toggle on/off panels from PyQGIS? 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 ...

Tweeted twitter.com/StackGIS/status/840970761540116480
Source Link
Jochen Schwarze
  • 14.9k
  • 8
  • 54
  • 120

Programmatically turn on/off panels with PyQgis

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).

enter image description here

I need to do this programmatically, so how to toggle on/off panels from PyQgis? 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 ...