VUtils: set default button as special button

This commit is contained in:
Le Tan 2017-12-09 17:48:36 +08:00
parent 2933e0f44c
commit 9f9cc553dd

View File

@ -415,6 +415,14 @@ int VUtils::showMessage(QMessageBox::Icon p_icon,
okBtn->style()->polish(okBtn); okBtn->style()->polish(okBtn);
} }
} }
QPushButton *defaultBtn = dynamic_cast<QPushButton *>(msgBox.button(p_defaultBtn));
if (defaultBtn) {
defaultBtn->setProperty("SpecialBtn", true);
defaultBtn->style()->unpolish(defaultBtn);
defaultBtn->style()->polish(defaultBtn);
}
return msgBox.exec(); return msgBox.exec();
} }