Style sheets and font weight bug
Hi, all.
I have a strange bug with QTabWidget styling it with custom sheet. So, I have the following code:
QTabBar::tab {
font-weight: bold;
padding: 0px 10px 0 10px;
}
And the font is really bold, but the place for the text doesn't increase, so first and last letters are invisible.
Any suggestions, what have I missed? Thanks in advance.
Re: Style sheets and font weight bug
Im not much into stylesheets, but is it possible to change the width of the tab using the stylesheet? Something like
min-width: 100;
Although it sounds like a bug
Re: Style sheets and font weight bug
Yeah, min-width works, but only if text width is less than its value. It doesn't fit my case.
Re: Style sheets and font weight bug
no it isn't bug
it is right you write, left righ pads are 0
Code:
font-weight: bold;
padding: 0px 10px 0 10px;
}
try without padding
Re: Style sheets and font weight bug
I tried it beforehand with no success :( I think it should recalculate widget size depending on font style changing, but it doesn't.
1 Attachment(s)
Re: Style sheets and font weight bug
see attachment
tested direct in designer
---------------------------
wxp, qt450, VS2008
Re: Style sheets and font weight bug
So, here's my screenshots, both with no padding.
Normal font:
http://img707.imageshack.us/img707/9...padding.th.png
Bold font:
http://img444.imageshack.us/img444/6...padding.th.png
Code:
background-color: #ffffff;
border: 2px solid #56aa04;
border-radius: 10px;
top: -1px;
}
left: 15px;
}
border: none;
color: #56aa04;
height: 25px;
font-weight: bold;
}
background-color: #ffffff;
border: 2px solid #56aa04;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
border-bottom: 3px solid #ffffff;
}
1 Attachment(s)
Re: Style sheets and font weight bug
I tried this on
Code:
border: 2px solid green;
border-radius: 5px;
}
{
border-top-left-radius:5px;
font: bold 8pt "MS Shell Dlg 2";
border-top-right-radius:5px;
border-top:2px solid green;
border-left:2px solid green;
border-right:2px solid green;
}
{
color: red;
}
it is working properly only when is in designer tabWidget->font->bold checked or programaticaly tabWidget->font()->setBold(true) called
combination of border and font-weight make this error/bug
Re: Style sheets and font weight bug
Thanks it makes the deal. I think this issue can be reported as bug on Qt's bugtracker...