I'm trying to remove some panels from Qgis (version 3.10.8 A Coruna) standard visualization executing the function below, but I always receive a crashing as result
def removePanels(): panels_to_keep = ["Layers", "StatisticalSummaryDockWidget", "IdentifyResultsDock", "GPSInformation","MessageLog", "Overview"] for panel in iface.mainWindow().findChildren(QDockWidget): if panel.objectName() not in panels_to_keep: iface.mainWindow().removeDockWidget( panel ) # <==== crash qgis