Selecting tabbed QDockwidgets
Hi,
I have several QDockWidgets tabbified in a QDockArea. I want to select one of them as the visible tab, but I don't find a way to do it programatically. Is there any way to do it? (its probably right under my nose but I cannot see it :confused:).
It would be easy to do with QTabBar::setCurrentIndex(). Is there a way to obtain the QTabBar of a QDockArea?
Thanks
Re: Selecting tabbed QDockwidgets
Re: Selecting tabbed QDockwidgets
From what he says the docks are already tabbed. He just wants to select one of them programatically.
Since you cannot access the docks tab widget, I suggest using QDockWindow::activateWindow(). Not sure if it works.
Re: Selecting tabbed QDockwidgets
Quote:
Originally Posted by
marcel
From what he says the docks are already tabbed. He just wants to select one of them programatically.
Yes, I know. But nobody said this method won't work for tabbed dock widgets.
Quote:
Since you cannot access the docks tab widget, I suggest using QDockWindow::activateWindow(). Not sure if it works.
Or QWidget::raise().
A stupid but working solution is to detabify the docs and tabify it back again.