通过勾选框QCheckBox来设置字体Dialog::click(bool checked){ // 勾选框的选中状态是checked QFont font = ui->text->...