How to modify the tab size?
-
Hello,
I was able to modify font size and type of a tab with stylesheets according to... tabs = QTabWidget() tabs.setStyleSheet('''QTabBar::tab {font-size: 10pt; font-family: Verdana; font-weight: bold;}''')
This works as intended but the problem is that when the content is large, many letters do not even show. I modified the last line as
tabs.setStyleSheet('''QTabBar::tab {font-size: 10pt; font-family: Verdana; font-weight: bold; height: 50px; width: 100px;}''')
Here, some tabs look oversized (e.g. "Data") whereas others are still not large enough (e.g. "A very long tag content ..."). I was wondering if there is some easy way to dynamically expand the tag size when the content is large. Thanks.
-
The default elide mode for tabs is defined by currently used style, but you can override it:
tabs.setElideMode(Qt::TextElideMode::ElideNone);