我创建了一个带有保存、放弃和取消按钮的
现在,我该如何将每个按钮绑定到特定的命令?
QMessageBox
:QMessageBox msgBox;
msgBox.setText("The document has been modified.");
msgBox.setInformativeText("Do you want to save your changes?");
msgBox.setStandardButtons(QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel);
msgBox.setDefaultButton(QMessageBox::Save);
msgBox.setIcon(QMessageBox::Question);
现在,我该如何将每个按钮绑定到特定的命令?