QMessageBox *msgBox = new QMessageBox(QMessageBox::Question, QSW("确认删除"),
QSW("是否删除?"), QMessageBox::Yes | QMessageBox::No, parent);
msgBox->button(QMessageBox::Yes)->setText(QSW("删除"));
msgBox->button(QMessageBox::No)->setText(QSW("取消"));
if (msgBox->exec() != QMessageBox::Yes)
return false;
parent 是父窗口的指针对象