From 9d6e819701566383461b469c77b245d6e8dc0572 Mon Sep 17 00:00:00 2001 From: Abdo Date: Sat, 23 Sep 2023 07:04:25 +0300 Subject: [PATCH] Support Qt.TextFormat.MarkdownText in aqt.utils (#2675) --- qt/aqt/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qt/aqt/utils.py b/qt/aqt/utils.py index 1703385f2..360139447 100644 --- a/qt/aqt/utils.py +++ b/qt/aqt/utils.py @@ -81,7 +81,7 @@ from aqt.qt import ( from aqt.theme import theme_manager if TYPE_CHECKING: - TextFormat = Literal["plain", "rich"] + TextFormat = Literal["plain", "rich", "markdown"] def aqt_data_path() -> Path: @@ -283,6 +283,8 @@ def showInfo( mb.setTextFormat(Qt.TextFormat.PlainText) elif textFormat == "rich": mb.setTextFormat(Qt.TextFormat.RichText) + elif textFormat == "markdown": + mb.setTextFormat(Qt.TextFormat.MarkdownText) elif textFormat is not None: raise Exception("unexpected textFormat type") mb.setText(text)