diff options
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; + } +} |