Question

I would like to use a large font size with a QComboBox. I tried setting the font-size using a style-sheet:

*{font-size: 22pt}

This does change the font size, but the spacing between the items in a QComboBox drop-down end up overlapping. How can I get a large font and also get the proper row spacing?

Était-ce utile?

La solution

Styles for the drop down of a QComboBox can be changed by applying relevant changes to QComboBox QAbstractItemView as showed in the following example:

QComboBox QAbstractItemView
{
   color:#ccc;
   background-color:#333;
   border:none;
   selection-background-color:#1c1c1c;
   selection-color: #ccc; 
   height: 30px;
}
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top