View Full Version : QT's style sheet does not work properly on Mac OS X

10th December 2009, 11:41
Hi all

I am trying to customize the QComboBox or QSpinBox using Qt's style sheet.
Here is the code i have written for customizing the QComboBox

QComboBox *pComboBox = new QComboBox();
pComboBox->setStyleSheet( "QComboBox{ font: bold; padding: 0px 6px; border-image: url(borderimage);} QComboBox::drop-down { width:" + QString::number(14) + "px; height:" + QString::number(14) + "; subcontrol-origin: padding; subcontrol-position: center right; image: url(dropdownimage); left:-5px;} QComboBox::drop-down:hover {image: url(dropdownhoverimage);} QComboBox::drop-down:on {image: url(dropdownonimage); } ");

But the combox bottom border is clipped slightly. It seems that there is issue in style sheet on Mac os x.

Any help.


10th December 2009, 11:50
Here is the screenshot of the customized QComboBox. Observe that bottom border has been less thicker than top border.