path: root/examples/widgets
diff options
authorShawn Rutledge <>2020-11-03 20:51:57 +0100
committerShawn Rutledge <>2020-11-07 09:35:11 +0100
commitf5c7799f59ba53c634906b11e2135190093bf87b (patch)
treec170f7ed71df77a3d8baebfb225c9179e58f72bb /examples/widgets
parent2106a625e8fa3eabfe2f3a774baacc898c763b44 (diff)
Support the markdown underline extension
MarkdownDialectGitHub now includes this feature, so *emph* is italicized and _emph_ is underlined. This is a better fit for QTextDocument capabilities; until now, _underlined_ markdown could be read, but would be rendered with italics, because in CommonMark, *emphasis* and _emphasis_ are the same. But QTextMarkdownWriter already writes underlining and italics distinctly in this way. [ChangeLog][QtGui][Text] By default (with MarkdownDialectGitHub), markdown _underline_ and *italic* text styles are now distinct. Fixes: QTBUG-84429 Change-Id: Ifc6defa4852abe831949baa4ce28bae5f1a82265 Reviewed-by: Volker Hilsheimer <>
Diffstat (limited to 'examples/widgets')
1 files changed, 6 insertions, 4 deletions
diff --git a/examples/widgets/richtext/textedit/ b/examples/widgets/richtext/textedit/
index a16a9197b4..158728a784 100644
--- a/examples/widgets/richtext/textedit/
+++ b/examples/widgets/richtext/textedit/
@@ -11,10 +11,12 @@ comments in each of the following sections to encourage you to experiment.
## Font and Paragraph Styles
-QTextEdit supports **bold**, *italic*, &amp; ~~strikethrough~~ font styles, and
-can display <span style="font-size:10pt; font-weight:600;
-color:#00007f;">multicolored</span> text. Font families such as <span
-style="font-family:Times New Roman">Times New Roman</span> and `Courier`
+QTextEdit supports **bold**, *italic*, _underline_ &amp; ~~strikethrough~~ font
+styles, and can display
+<span style="font-size:10pt; font-weight:600; color:#00007f;"> multicolored</span>
+text. Font families such as
+<span style="font-family:Times New Roman">Times New Roman</span> and
+<span style="font-family:Courier">Courier</span>
can also be used directly. *If you place the cursor in a region of styled text,
the controls in the tool bars will change to reflect the current style.*