When I create a combobox using PyQt5 on MacOS Big Sur, whether using the Designer or using code, the standard font size (13) allows for some padding around the text; this is what I want. A simple code would be:
from PyQt5 import QtWidgets as qtw
if __name__=='__main__':
app = qtw.QApplication([])
comboBox = qtw.QComboBox()
comboBox.addItem('My first item')
comboBox.addItem('My second item')
comboBox.show()
However when I increase the font size to 25, for example by adding:
font = comboBox.font()
font.setPointSize(25)
comboBox.setFont(font)
I get the following:
which is clearly too cramped. Does anyone know how to change this? I get the same result setting the font size in Designer's property editor and setting it in a stylesheet.
Edit: Just tried on Ubuntu and here it works as expected...:
This issue has been accepted as a bug; see QTBUG-98042.