[Qt-interest] Setting QGroupbox border color in stylesheet creates spacing issues

anjani gupta anjanigupta_dce at yahoo.com
Sun Jun 7 09:37:39 CEST 2009


Hi,

In Windows with display theme as 'Windows XP', if  'QGroupbox' is shown in 'QMainWindow', it's border is not visible. It looks like main window's background color and QGroupbox border color is same. To fix this, I am trying to set QGroupBox border color in stylesheet as follows:

QGroupBox { border: 1px solid red; margin-top: 3ex; }
QGroupBox::title {
subcontrol-origin: margin;
left: 5px;
top: 3px;
}

With this style setting, spacing between groupbox title and first widget in groupbox gets reduced. Is there some way to resolve this? Please find the screenshot attached with this mail to get clear picture of problem.

Thanks in advance!

Regards,
Anjani




      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090607/daa890d9/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: comparison.JPG
Type: image/jpeg
Size: 30582 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090607/daa890d9/attachment.jpe 


More information about the Qt-interest-old mailing list