mirror of
https://github.com/edisionnano/QDiskInfo.git
synced 2026-04-08 05:01:29 +03:00
Add a custom button
This commit is contained in:
@@ -321,10 +321,9 @@ void MainWindow::selfTestHandler(const QString &mode, const QString &name, const
|
|||||||
msgBox.setWindowTitle(tr("Test Already Running"));
|
msgBox.setWindowTitle(tr("Test Already Running"));
|
||||||
msgBox.setText(tr("A self-test is already being performed ") + percentage + tr("\nYou can press the Cancel button in order to abort the test that is currently running"));
|
msgBox.setText(tr("A self-test is already being performed ") + percentage + tr("\nYou can press the Cancel button in order to abort the test that is currently running"));
|
||||||
msgBox.setIcon(QMessageBox::Warning);
|
msgBox.setIcon(QMessageBox::Warning);
|
||||||
|
QPushButton *cancelButton = msgBox.addButton(tr("Cancel"), QMessageBox::ActionRole);
|
||||||
QPushButton *cancelButton = msgBox.addButton(QMessageBox::Cancel);
|
cancelButton->setIcon(qApp->style()->standardIcon(QStyle::SP_DialogCancelButton));
|
||||||
msgBox.addButton(QMessageBox::Ok);
|
msgBox.addButton(QMessageBox::Ok);
|
||||||
|
|
||||||
msgBox.exec();
|
msgBox.exec();
|
||||||
|
|
||||||
if (msgBox.clickedButton() == cancelButton) {
|
if (msgBox.clickedButton() == cancelButton) {
|
||||||
|
|||||||
Reference in New Issue
Block a user