How to set QTabBar 's tab to the max width?
-
I reimplement the QTabBar and setExpanding(ture);
and I use qss to set the tabs width:
@
CTabBar::tab {
min-width:60px;
max-width:170px;
}
@When the tabbar has a lot of free space and the tab's title has few word, the tab will have mininum width.
How the let the tab have the max-width when the title has few word?
By the way , I have to set the min-width because when has many tabs, it can zoom out.