1
0
Эх сурвалжийг харах

fix: 处理 Markdown 预览在 Qt5.14 版本以下的编译错误

zinface 2 жил өмнө
parent
commit
a0bf03b399
1 өөрчлөгдсөн 10 нэмэгдсэн , 0 устгасан
  1. 10 0
      src/markdownview.cpp

+ 10 - 0
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
+	
 }