[QGIS-Developer] Get current QDockWidget in specific location

2024-06-12 Thread Catania, Luke A ERDC-RDE-GRL-VA CIV via QGIS-Developer
How can I get the reference to a QDockWidget that is already docked. I want to call tabifyDockWidget so I can add a new QDockWidget to the same location. The first is already in place from exsiting code and I know I can probably create a getter method on the code that adds the first doc widget

Re: [QGIS-Developer] Get current QDockWidget in specific location

2024-06-13 Thread Germán Carrillo via QGIS-Developer
Hi Luke, you can get a list of all QDockWidget objects in this way: iface.mainWindow().findChildren(QDockWidget) >From there you could get objectNames, whether the dock widget is visible or not, its allowed areas and window title, among other properties. The objectName is relevant, because you

Re: [QGIS-Developer] Get current QDockWidget in specific location

2024-06-13 Thread Germán Carrillo via QGIS-Developer
BTW, note that you can omit the 3rd parameter in addTabifiedDockWidget() and your dock widget will be tabified in that location, no matter which dock widget is already placed there. iface.addTabifiedDockWidget(Qt.RightDockWidgetArea, my_own_dock_widget) On the other hand, if you really need to g