UI: Add ability to use rich text in warning dialogs
Allows the ability to use things such as links in warning dialogs, optionally. Disabled by default.
This commit is contained in:
parent
21ce267ad4
commit
3bd99797d9
@ -93,11 +93,14 @@ void OBSMessageBox::information(
|
||||
void OBSMessageBox::warning(
|
||||
QWidget *parent,
|
||||
const QString &title,
|
||||
const QString &text)
|
||||
const QString &text,
|
||||
bool enableRichText)
|
||||
{
|
||||
QMessageBox mb(QMessageBox::Warning,
|
||||
title, text, QMessageBox::Ok,
|
||||
parent);
|
||||
if (enableRichText)
|
||||
mb.setTextFormat(Qt::RichText);
|
||||
mb.setButtonText(QMessageBox::Ok, QTStr("OK"));
|
||||
mb.exec();
|
||||
}
|
||||
|
@ -51,7 +51,8 @@ public:
|
||||
static void warning(
|
||||
QWidget *parent,
|
||||
const QString &title,
|
||||
const QString &text);
|
||||
const QString &text,
|
||||
bool enableRichText = false);
|
||||
static void critical(
|
||||
QWidget *parent,
|
||||
const QString &title,
|
||||
|
Loading…
x
Reference in New Issue
Block a user