<?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[RTF]]></title><description><![CDATA[<p dir="auto">How do I copy rtf text (ctrl + c) and paste it into a QTextEdit widget in run time while preserving the rich text format? Btw, this works in QDialog until I save it to a QStringList and retrieve it which converts it to plain text. Also, is it possible for a Qt programmer to incorporate the rtf editor available in QtCreator into his/her own apps?</p>
]]></description><link>https://forum.qt.io/topic/153999/rtf</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Apr 2026 20:11:11 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/153999.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 22 Jan 2024 02:51:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to RTF on Mon, 22 Jan 2024 12:30:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/pl45m4">@<bdi>Pl45m4</bdi></a> said in <a href="/post/787293">RTF</a>:</p>
<blockquote>
<p dir="auto"><a href="https://doc.qt.io/qt-6/richtext.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-6/richtext.html</a><br />
<a href="https://doc.qt.io/qt-6/richtext-structure.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-6/richtext-structure.html</a></p>
</blockquote>
<p dir="auto">Thanks for the help. I will check out the web sites and source code tomorrow.</p>
]]></description><link>https://forum.qt.io/post/787320</link><guid isPermaLink="true">https://forum.qt.io/post/787320</guid><dc:creator><![CDATA[Charlie2406]]></dc:creator><pubDate>Mon, 22 Jan 2024 12:30:32 GMT</pubDate></item><item><title><![CDATA[Reply to RTF on Mon, 22 Jan 2024 07:01:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/charlie2406">@<bdi>Charlie2406</bdi></a> Welcome to the Qt forums</p>
<p dir="auto">I assume you mean text with a format applied and not <a href="https://en.wikipedia.org/wiki/Rich_Text_Format" target="_blank" rel="noopener noreferrer nofollow ugc">RTF</a>.  There is no RTF support in Qt that I am aware of.</p>
<p dir="auto">The QTextEdit will accept some rich text if the <a href="https://doc.qt.io/qt-6/qtextedit.html#acceptRichText-prop" target="_blank" rel="noopener noreferrer nofollow ugc">QTextEdit::acceptRichText()</a> property is true (the default).  In this case, the clipboard would need the clipboard MIME data to include either an HTML component, a rich text copy from another Qt program (application/x-qrichtext or application/x-qt-richtext), or possibly Markdown (text/markdown).</p>
<p dir="auto">You can <a href="https://doc.qt.io/qt-6/qtextedit.html#canInsertFromMimeData" target="_blank" rel="noopener noreferrer nofollow ugc">QTextEdit::canInsertFromMimeData()</a> and  <a href="https://doc.qt.io/qt-6/qtextedit.html#insertFromMimeData" target="_blank" rel="noopener noreferrer nofollow ugc">QTextEdit::insertFromMimeData()</a> to cater for anything you need to paste.</p>
]]></description><link>https://forum.qt.io/post/787301</link><guid isPermaLink="true">https://forum.qt.io/post/787301</guid><dc:creator><![CDATA[ChrisW67]]></dc:creator><pubDate>Mon, 22 Jan 2024 07:01:03 GMT</pubDate></item><item><title><![CDATA[Reply to RTF on Mon, 22 Jan 2024 03:59:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/charlie2406">@<bdi>Charlie2406</bdi></a> said in <a href="/post/787290">RTF</a>:</p>
<blockquote>
<p dir="auto">Btw, this works in QDialog until I save it to a QStringList and retrieve it which converts it to plain text</p>
</blockquote>
<p dir="auto">Of course, you cant save rich text in a plain <code>QString</code>.</p>
<blockquote>
<p dir="auto">Also, is it possible for a Qt programmer to incorporate the rtf editor available in QtCreator into his/her own apps?</p>
</blockquote>
<p dir="auto">Look at the QtCreator source how it's done there and feel free to built your own :)</p>
<p dir="auto">This might also be helpful:</p>
<ul>
<li><a href="https://doc.qt.io/qt-6/richtext.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-6/richtext.html</a></li>
<li><a href="https://doc.qt.io/qt-6/richtext-structure.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-6/richtext-structure.html</a></li>
</ul>
]]></description><link>https://forum.qt.io/post/787293</link><guid isPermaLink="true">https://forum.qt.io/post/787293</guid><dc:creator><![CDATA[Pl45m4]]></dc:creator><pubDate>Mon, 22 Jan 2024 03:59:16 GMT</pubDate></item></channel></rss>