문제

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 the QTabBar of your QTabWidget via the tabBar 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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top