提交 3bd99797 编写于 作者: J jp9000

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.
上级 21ce267a
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册