mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2024-11-20 08:10:11 +00:00
20 lines
598 B
C++
20 lines
598 B
C++
|
#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;
|
||
|
}
|
||
|
}
|