mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2024-12-26 18:14:22 +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;
|
|
}
|
|
}
|