How to custom QComboBox
Anybody knows where can I consult how can I custom a QComboBox setting the stylesheet?
I want, for example, change the font size displayed. I want to know the different parts of the QComboBox, etc.
Thank you very much!!
Thank you very much but, for example, I have created a QComboBox with a 12pt font size. When I push the QComboBox, the different entries have 8pt font sizes. How can I change it?
The customization of the llist is the second part of the example (even if it is really short). In fact you have to customize QComboBox QAbstractItemView that corresponds to the list. You might have to add the ::item to customize the items of the list.
try by following code and change the properties with your appropriate inputs.
border: 1px solid #333333;
background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #797979, stop:0.48 #696969, stop:0.52 #5e5e5e, stop:1 #4f4f4f);
padding: 1px 23px 1px 3px;
subcontrol-position: top right;
border-top-right-radius: 3px; border-bottom-right-radius: 3px;
selection-background-color: #999999; selection-color: #4f4f4f;
Its not really changing the items fonts but good start
there i have not assign any value to font item so...