<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Is it possible to set indent for QTextEdit&#x27;s markdown content]]></title><description><![CDATA[<p dir="auto">I am currently exploring QTextEdit's rendering of Markdown text. The problem is shown in the below image:</p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/cdde5cdc-25df-413e-a2f3-4c4b9a823c8a.png" alt="Screenshot_2024-01-19_13-42-29.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">In the original plain text (bottom half), my "- Hello worldsd"'s indent is expected (well actually it is not indent, just some margin). But in the rendered textbox (top half), the indent becomes very large, occupying ~20% of the entire width of my QTextEdit.<br />
My question is whether or not it is possible to make the indent smaller, ideally configurable.</p>
<p dir="auto">Thanks,</p>
]]></description><link>https://forum.qt.io/topic/153944/is-it-possible-to-set-indent-for-qtextedit-s-markdown-content</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Apr 2026 12:00:06 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/153944.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 19 Jan 2024 05:45:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Is it possible to set indent for QTextEdit&#x27;s markdown content on Sat, 20 Jan 2024 14:53:13 GMT]]></title><description><![CDATA[<p dir="auto">Turns out that it is possible, it is defined under the <code>document</code> member variable of <code>QTextEdit</code>:</p>
<pre><code>ui-&gt;textEdit-&gt;document()-&gt;setIndentWidth(10);
</code></pre>
]]></description><link>https://forum.qt.io/post/787197</link><guid isPermaLink="true">https://forum.qt.io/post/787197</guid><dc:creator><![CDATA[mamsds]]></dc:creator><pubDate>Sat, 20 Jan 2024 14:53:13 GMT</pubDate></item><item><title><![CDATA[Reply to Is it possible to set indent for QTextEdit&#x27;s markdown content on Fri, 19 Jan 2024 06:44:42 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/user/chrisw67">@<bdi>ChrisW67</bdi></a> , for <code>tabStopDistance()</code>, I actually checked it before posting. It doesnt help in this case.<br />
On nested list argument, note that I was talking about the first line, i.e., <code>* Hello worldsd</code> line, the indent is large already. I am not specifically asking to tweak the indent of the 2nd line (i.e., <code>* asd</code>)</p>
]]></description><link>https://forum.qt.io/post/787015</link><guid isPermaLink="true">https://forum.qt.io/post/787015</guid><dc:creator><![CDATA[mamsds]]></dc:creator><pubDate>Fri, 19 Jan 2024 06:44:42 GMT</pubDate></item><item><title><![CDATA[Reply to Is it possible to set indent for QTextEdit&#x27;s markdown content on Fri, 19 Jan 2024 06:22:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mamsds">@<bdi>mamsds</bdi></a> Welcome to the Qt forums.</p>
<p dir="auto">I would start by looking at <a href="https://doc.qt.io/qt-6/qtextedit.html#tabStopDistance-prop" target="_blank" rel="noopener noreferrer nofollow ugc">QTextEdit::tabStopDistance()</a> to see if that adjusts the indenting depth of the lists.</p>
<p dir="auto">Markdown is not WYSIWYG and you have asked for nested unordered lists, which it has given you.  I do not consider that there is a <em>problem</em> here.</p>
]]></description><link>https://forum.qt.io/post/787012</link><guid isPermaLink="true">https://forum.qt.io/post/787012</guid><dc:creator><![CDATA[ChrisW67]]></dc:creator><pubDate>Fri, 19 Jan 2024 06:22:31 GMT</pubDate></item></channel></rss>