149 fTabWidget->setCurrentIndex(which);
151 QWidget *w = fTabWidget->currentWidget();
154 cout <<
"Weird... the tab requested to be closed doesn't exist!" << endl;
158 QDockWidget *d = w->findChild<QDockWidget*>();
161 cout <<
"Sorry, tab requested to be closed contains no QDockWidget!" << endl;
165 new DockWindow(d, fTabWidget->tabText(which));
166 fTabWidget->removeTab(which);
168 if (fTabWidget->count()==1)
169 fTabWidget->setTabsClosable(
false);
A main window which can be used to display a QDockWidget from a tab.