ui.buttonBox->button(QDialogButtonBox::Ok)->setText(tr("确定")); ui.buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("取消"));