[SOLVED]How to hide tab's label
-
Hi,
Did you try to add a tab with an icon and empty string ?
If it still doesn't fit your need, you will have to subclass QTabBar to make it look like you want.
-
bq. Did you try to add a tab with an icon and empty string ?
yes
bq. If it still doesn’t fit your need, you will have to subclass QTabBar to make it look like you want.
Currently it works fine without subclassing, even if I subcalss it I've a problem with showing the tabs because the tab keeps some space for the label even if it's empty
-
Then you would have to reimplement the paint event to draw only the icon
-
What hint are you looking for ?
-
[quote]What hint are you looking for ?[/quote]
I wanted to know how reimplement the paint event to draw only the icon (as you suggested).
Any way, Thank you I fixed this issue by using stylesheet as following:
[code]QTabBar::tab {
background-color: rgb(0, 0, 0, 0);
padding: 2px;
border: 2px;
text-align: center;
height: 64px;
width: 64px;
}[/code]