I would start by creating a custom QWidget (derived from QTabBar) that contains both a QTabBar and a QToolBar widget in a layout. Then, derive a custom QTabWidget class that replaces its native QTabBar with an instance of your custom tab bar class (see QTabWidget::setTabBar()). This is a protected function, so you are forced to derive a new QTabWidget class. You would probably need to do that anyway, because you will be changing the tool bar contents depending on what is being displayed in a specific tab.
Bookmarks