C++ (Qt)mbox->addButon("ok", QMessageBox::AcceptRole);
C++ (Qt)mbox->addButton(QMessageBox::Ok)
C++ (Qt)mbox->addButon("ok", QMessageBox::AcceptRole);отmbox->addButton("ok", QMessageBox::AcceptRole);
C++ (Qt) 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); int ret = msgBox.exec();
C++ (Qt) msgBox.setStandardButtons(QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel);