diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-10-29 22:14:57 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-10-29 22:14:57 +0100 |
commit | 44823324f9f489adf957a459bac5dd4d0693e85e (patch) | |
tree | 7d761d3c8189c06dda83e3fa88f281a24ab46e4b /gui/CustomMessageBox.cpp | |
parent | 946d397ccedfe1c116566fce1f86ae4f794e44a4 (diff) | |
parent | 511417c4f7a9429619492092201253124ee9fed9 (diff) | |
download | MultiMC-44823324f9f489adf957a459bac5dd4d0693e85e.tar MultiMC-44823324f9f489adf957a459bac5dd4d0693e85e.tar.gz MultiMC-44823324f9f489adf957a459bac5dd4d0693e85e.tar.lz MultiMC-44823324f9f489adf957a459bac5dd4d0693e85e.tar.xz MultiMC-44823324f9f489adf957a459bac5dd4d0693e85e.zip |
Merge branch 'develop' of github.com:MultiMC/MultiMC5 into develop
Diffstat (limited to 'gui/CustomMessageBox.cpp')
-rw-r--r-- | gui/CustomMessageBox.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gui/CustomMessageBox.cpp b/gui/CustomMessageBox.cpp new file mode 100644 index 00000000..e55ebbbb --- /dev/null +++ b/gui/CustomMessageBox.cpp @@ -0,0 +1,19 @@ +#include "CustomMessageBox.h" + +namespace CustomMessageBox +{ + QMessageBox *selectable(QWidget *parent, const QString &title, const QString &text, + QMessageBox::Icon icon, QMessageBox::StandardButtons buttons, + QMessageBox::StandardButton defaultButton) + { + QMessageBox *messageBox = new QMessageBox(parent); + messageBox->setWindowTitle(title); + messageBox->setText(text); + messageBox->setStandardButtons(buttons); + messageBox->setDefaultButton(defaultButton); + messageBox->setTextInteractionFlags(Qt::TextSelectableByMouse); + messageBox->setIcon(icon); + + return messageBox; + } +} |