How to change QPushButton Font Family

How can I change the font family of my qpushbutton. I don't like the default font. SetFont and setStyleheet seems not to work

1 answer

  • answered 2018-08-08 23:58 pajarnas

    QFont font = ui->pushButton->font();
    font.setPointSize(16);
    ui->pushButton->setFont(font);