Qt-interest Archive, June 2007
QGroupBox styling broken in 4.2.2 and 4.2.3?
Message 1 in thread
I was customizing QGroupBox stylings with a .qss style sheet. As of
4.2.2, the titles seem broken - the border draws right through, and I
cannot fix this for 4.2.2 and 4.2.3.
Any ideas?
--
[ signature omitted ]
Message 2 in thread
greg wrote:
> I was customizing QGroupBox stylings with a .qss style sheet. As of
> 4.2.2, the titles seem broken - the border draws right through, and I
> cannot fix this for 4.2.2 and 4.2.3.
>
> Any ideas?
Here is what works in 4.2.1, not in 4.2.2 and up:
QGroupBox{
font-weight: bold;
border-width: 2px;
margin: 4px;
padding: 2px;
border-style: solid;
border-color: #7ac1ba;
border-radius: 5px;
}
QGroupBox::title{
subcontrol-origin: border;
padding: 7px;
left: 5px;
top: -1ex;
}
--
[ signature omitted ]
Message 3 in thread
greg wrote:
> greg wrote:
>> I was customizing QGroupBox stylings with a .qss style sheet. As of
>> 4.2.2, the titles seem broken - the border draws right through, and I
>> cannot fix this for 4.2.2 and 4.2.3.
>>
>> Any ideas?
>
This was a regression introduced in 4.2.2. This is fixed in 4.3. There
is an easy workaround though - Just add a bogus background-image to the
title subcontrol. Something like this (I modified your qss a bit)
QGroupBox{
font-weight: bold;
border-width: 2px;
margin-top: 1ex;
padding: 2px;
border-style: solid;
border-color: #7ac1ba;
border-radius: 5px;
}
QGroupBox::title{
subcontrol-origin: margin;
padding: 0 7px;
left: 5px;
background-image: url(bogus);
}
Please contact support if you need the one-liner patch for 4.2.
Girish
--
[ signature omitted ]