mirror of https://gitee.com/cxasm/notepad--.git
fix: 处理 Markdown 预览在 Qt5.14 版本以下的编译错误
This commit is contained in:
parent
fd1b4595fd
commit
a0bf03b399
|
@ -14,5 +14,15 @@ MarkdownView::~MarkdownView()
|
||||||
|
|
||||||
void MarkdownView::viewMarkdown(QString& text)
|
void MarkdownView::viewMarkdown(QString& text)
|
||||||
{
|
{
|
||||||
|
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
|
||||||
|
QString tips = QString(
|
||||||
|
"NOTE: Your Qt version is lower than 5.14, so you can't preview Markdown for the time being."
|
||||||
|
"\n"
|
||||||
|
"\n"
|
||||||
|
"%1").arg(text);
|
||||||
|
ui.textEdit->setPlainText(tips);
|
||||||
|
#else
|
||||||
ui.textEdit->setMarkdown(text);
|
ui.textEdit->setMarkdown(text);
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue