[solved]qcombobox popup stylesheet
-
Good day.
I'm trying to set the QComboBox popup list but unable to change the font size.
Anyone know how to do this?I tried as follows:
@
QLabel, QComboBox QAbstractItemView{
color:red;
font: 20pt bold;
}@
/or/
@QLabel, QAbstractItemView{
color:red;
font: 20pt bold;
}@With QLabel everything happens correctly, with [QAbstractItemView], only the color has changed.
[Edit: Added @ tags -- mlong]
-
Worked properly, thank you:
implementation:
@
int dpi=QPaintDevice::physicalDpiX();
int fontsize=dpi/12; //change to your liking
QFont myf=QApplication::font();
myf.setPixelSize(fontsize);
QApplication::setFont(myf);
@[Edit: Added @ tags -- mlong]