开发者

How to make all tabs in QTabBar not been selected?

开发者 https://www.devze.com 2023-03-17 15:40 出处:网络
How to make all tabs in QTabBar not 开发者_JAVA技巧been selected? Thank you.@ilyabvt at forum.crossplatform.ru suggested to create first fake tab and use Qt Style Sheets to make it\'s width = 0:

How to make all tabs in QTabBar not 开发者_JAVA技巧been selected?

Thank you.


@ilyabvt at forum.crossplatform.ru suggested to create first fake tab and use Qt Style Sheets to make it's width = 0:

QTabBar::tab:first {
  max-width: 0px;
}

This approach works fine with QTabBar integrated in QTabWidget. But unfortunately doesn't work with single QTabBar (look the screenshot below). Maybe it is my fault, but i cant find out where the mistake.

How to make all tabs in QTabBar not been selected?


I think it's supposed to be like radio buttons, i.e. there is always one selected. If none of the tabs are active perhaps the whole bar should be disabled.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号