Fixing Tab-size in a QTabWidget
General and Desktop
2
Posts
2
Posters
7.0k
Views
1
Watching
-
I added a QTabWidget in my interface at design time.
I am adding tabs to the widget at run time using the following code.@ tabWidget->setStyleSheet("QTabBar::tab { max-width: 100px; }");
tabWidget->addTab(new QWidget(),fileName);@I need to fix the size of a Tab. Above style sheet is not working and QTabWidget does not follow this max-width restriction.
Am I missing something in my code or Is there another way of doing this?Any help is appreciated.