I have three QDockWidgets which are tabbed at startup using QMainWindow.tabifyDockWidget
.
In the main window, after all of the addDockWidget
calls:
self.tabifyDockWidget(self.dock_widget1, self.dock_widget2)
self.tabifyDockWidget(self.dock_widget1, self.dock_widget3)
Based on certain actions, I'd like to select one of these tabs and bring it to focus, or, on top of the other two, if it's not already visible. I've tried using setVisible
and setWindowState(Qt.WindowActive)
, but nothing changes.
Is there a way to programmatically select a tabbed dock widget and bring it to the front?