On this site there is a picture with two "tab-systems". I would like to have the second one, which is described as "A truncated tab bar shown in the Plastique widget style." There you have arrows, which allow you to slide through the tabs.
I have implented a "tab-system" which looks like this:
QTabWidget *tabWidget = new QTabWidget();
tabWidget->addTab(ToolGroupBox(),"Toolbox");
tabWidget->addTab(CameraGroupBox(),"Camera");
...
QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(tabWidget);
As I understand it is possible to create the truncated tabs if I use the tabRect-function of the QTabBar-class. I have tried several things but unfortunately its not working.
You want the usesScrollButtons property of the
QTabBar
. You can access theQTabBar
of yourQTabWidget
via thetabBar
method.You don't need to get involved with
tabRect
at all. The documentation just before the picture of the two tab systems is not directly related to it. The figure is just showing you two possible tab styles.