Problem styling QComBox using stylesheet
Hi,
I am trying to set the back-ground of combobox which is editable.
But background seems to be not working for the embedded QLineEdit control.
Following is my stylesheet implementation and I am using designer and QT 4.3
QComboBox
{
border: 1px solid;
padding: 2px 25px 2px 10px;
}
QComboBox::drop-down
{
subcontrol-origin: margin;
subcontrol-position: top right;
width: 20px;
margin-top: 2px;
border-style: solid;
border-width: 0px 0px 0px 1px;
border-color: #999999;
border-style: solid; /* just a single line */
borde-radius: 0px; /* same radius as the QComboBox */
background-color: transparent;
}
QComboBox:editable
{
color: #02174E;
border-color: #004D9F;
background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 red, stop:1 green);
}
I tested the above stylesheet by putting two combox controls on dialog in QT designer. One of the control is editable and enabled while other is editable but disabled.
Can anybody help me out in setting the back-ground correct in this case?
Re: Problem styling QComBox using stylesheet
Access background of the combo box via QListView..
Re: Problem styling QComBox using stylesheet
I tried following
QComboBox:editable > ListView
{
background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 red, stop:1 green);
}
but not working??
Re: Problem styling QComBox using stylesheet
it was typo in my earlier responce code was
QComboBox:editable > QListView
{
background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 red, stop:1 green);
}
but not worked?
Re: Problem styling QComBox using stylesheet