sanjayshelke
10th December 2009, 10: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.
regards,
~Sanjay
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.
regards,
~Sanjay