<?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[QTextEdit questions]]></title><description><![CDATA[<ol>
<li>
<p dir="auto">Is it possible to ask the text edit control to use a slightly tighter line spacing?</p>
</li>
<li>
<p dir="auto">Is there any simple way to append text without adding a new line?</p>
</li>
</ol>
<p dir="auto">Thanks, David</p>
]]></description><link>https://forum.qt.io/topic/145047/qtextedit-questions</link><generator>RSS for Node</generator><lastBuildDate>Mon, 17 Aug 2026 19:32:33 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/145047.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 11 May 2023 08:46:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QTextEdit questions on Thu, 11 May 2023 13:42:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a> Thanks for the pointer</p>
<p dir="auto">Here's what I did for the spacing etc.</p>
<pre><code>//
// Before any messages are written to the log, reduce the line spacing a bit
// and reduce the font size by one
//
QTextBlockFormat bf = messageLog-&gt;textCursor().blockFormat();
bf.setLineHeight(85, QTextBlockFormat::ProportionalHeight);
messageLog-&gt;textCursor().setBlockFormat(bf);
QFont font{ messageLog-&gt;currentFont() };
font.setPointSize(font.pointSize() - 1); font.setWeight(QFont::Medium);
messageLog-&gt;setFont(font);
</code></pre>
<p dir="auto">and for appending:</p>
<pre><code>messageLog-&gt;moveCursor(QTextCursor::End);
messageLog-&gt;insertPlainText(message);
</code></pre>
]]></description><link>https://forum.qt.io/post/757904</link><guid isPermaLink="true">https://forum.qt.io/post/757904</guid><dc:creator><![CDATA[Perdrix]]></dc:creator><pubDate>Thu, 11 May 2023 13:42:18 GMT</pubDate></item><item><title><![CDATA[Reply to QTextEdit questions on Thu, 11 May 2023 08:54:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/perdrix">@<bdi>Perdrix</bdi></a> said in <a href="/post/757857">QTextEdit questions</a>:</p>
<blockquote>
<p dir="auto">Is it possible to ask the text edit control to use a slightly tighter line spacing?</p>
</blockquote>
<p dir="auto">Many examples from Google <code>qtextedit set line spacing</code>, such as <a href="https://stackoverflow.com/questions/10250533/set-line-spacing-in-qtextedit" target="_blank" rel="noopener noreferrer nofollow ugc">https://stackoverflow.com/questions/10250533/set-line-spacing-in-qtextedit</a> ?</p>
<blockquote>
<p dir="auto">Is there any simple way to append text without adding a new line?</p>
</blockquote>
<p dir="auto">Since <code>QTextEdit::append()</code> "Appends a new paragraph" I would <em>guess</em> you need to use a <code>QTextCursor</code> to do something like insert text at the end of the existing last paragraph?</p>
]]></description><link>https://forum.qt.io/post/757858</link><guid isPermaLink="true">https://forum.qt.io/post/757858</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Thu, 11 May 2023 08:54:31 GMT</pubDate></item></channel></rss>