Important: Please read the Qt Code of Conduct -

Reformulated: labels and buttons don't inherit font properties on Mac

  • Hello,

    While porting my Windows application to Mac, I notices an inconsistent behaviour:

    While I can change the font size on Windows for my whole application with


    this doesn't work for label and button widgets on Mac (but works fine for checkboxes for instance). I am wondering if this might be a bug or a feature?

    I of course made sure that all widgets have default parameters for the font in their properties.


  • If anyone is interested:

    I solved my problem with following line of code:
    qApplication->setStyleSheet("QPushButton { font: 10px} QLabel { font: 10px} QLineEdit { font: 10px} QCheckBox { font: 10px} QGroupBox { font: 10px} QComboBox { font: 10px} QListWidget { font: 10px} QRadioButton { font: 10px}");
    (Globally setting the font size ( qApplication->setFont(newFont) )would not affect all the widget types on Mac)

Log in to reply