From a0bf03b399330524c896bc95b75828fe286f05e0 Mon Sep 17 00:00:00 2001 From: zinface Date: Thu, 25 May 2023 15:57:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A4=84=E7=90=86=20Markdown=20?= =?UTF-8?q?=E9=A2=84=E8=A7=88=E5=9C=A8=20Qt5.14=20=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E4=BB=A5=E4=B8=8B=E7=9A=84=E7=BC=96=E8=AF=91=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/markdownview.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/markdownview.cpp b/src/markdownview.cpp index 18cd647..892ceed 100755 --- a/src/markdownview.cpp +++ b/src/markdownview.cpp @@ -14,5 +14,15 @@ MarkdownView::~MarkdownView() 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); +#endif + } \ No newline at end of file