<?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[[Qt 6.12] Deprecation of QString in 6.12.0 and complete removal in 6.12.1.4.1]]></title><description><![CDATA[<p dir="auto">TL;DR: <code>QString</code> deprecated in 6.12.0 and removed in 6.12.1.4.1</p>
<h1>Summary</h1>
<p dir="auto">In the long tradition of improving Qt’s string‑handling robustness and eliminating unnecessary heap traffic wherever possible, we are taking the next logical step in the evolution of Qt APIs:<br />
<code>QString</code> will be deprecated in Qt 6.12.0 and scheduled for complete removal in Qt 6.12.1.4.1<br />
This change has been a long time coming. In fact, several of us remember the hallway conversations going back to 2008, predicting the unavoidable sunset of <code>QString</code>. At the time, this was dismissed as academic speculation. But with the proliferation of string‑view types in Qt 6, the ecosystem is finally ready.</p>
<h1>Rationale</h1>
<p dir="auto">As everyone who has followed Qt’s architecture work over the years knows, <code>QString</code> has historically been the primary source of:</p>
<ul>
<li>silent heap allocations,</li>
<li>shared‑data aliasing footguns,</li>
<li>UTF‑16 monoculture,</li>
<li>and the false security that a string class could ever be both “easy to use” and “correct”.</li>
</ul>
<p dir="auto">The new design philosophy is simple:<br />
<em>Every string is a view, and every view can be viewed differently.</em></p>
<p dir="auto">To that end, we are delighted to promote the increasingly mature family of modern C++‑compatible string‑view types, including but absolutely not limited to:</p>
<pre><code>QStringView
QLatin1StringView
QConstLatin1StringView
QUtf8StringView
QAnyAprilStringView
QTranscendentStringView
QPossiblyDanglingButDefinitelyNotOwnedView
QTerseYetHyperSpecificStringView
QNonOwningCharacterRangeOfUnclearLifetimeView
QOverView
</code></pre>
<p dir="auto">...and, starting in 6.12, the new<br />
<code>QViewOfAViewOfAView</code>, providing an overview over a <code>QStringView</code> over a <code>QByteArrayView</code> over an implementation detail I don't even remotely understand. My only code comment (requiring to add an autotest) caused a shit storm.</p>
<p dir="auto">All of these share one important characteristic:<br />
<em><strong>They do not own memory.</strong></em> Whether you own the memory is, of course, your own responsibility.<br />
This aligns with long‑standing architectural recommendations from an undisclosed colleague, who has consistently reminded us that if anything touches the heap, it is already too late.</p>
<h1>Acknowledgements</h1>
<p dir="auto">A special thank‑you to <a class="plugin-mentions-user plugin-mentions-a" href="/user/mike-trahearn-0">@<bdi>Mike-Trahearn-0</bdi></a>, who has for many years been a leading advocate of stringless frameworks. His internal write‑up, “If you need to print text, you already made a design mistake”, has been inspirational to many of us.<br />
On a personal note as a double bass player, I’ve always considered <code>QString</code> problematic at the conceptual level: I prefer <code>[E|A|D|G]String</code>. Strings that actually exist on an instrument — unlike <code>QString</code>, which, as far as I can tell, neither electric bass, upright bass, nor any orchestral string instrument has ever implemented. Let's not descend into the abyss of <code>BString</code> (aka <code>HString</code>), used by <code>5String</code> basses. IMHO this evil should have been deprecated before its invention.</p>
<h1>Migration Plan</h1>
<h4>Starting in Qt 6.12.0:</h4>
<p dir="auto">Using <code>QString</code> will trigger a deprecation warning narrowing the 47 recommended string‑view variants down to a maximum of 16 (0x10).<br />
Which one is recommended depends entirely on context, encoding, meteorological patterns, phase of the moon and, of course your <code>CMake</code> version.</p>
<h4>Starting in Qt 6.12.1.4.1:</h4>
<p dir="auto"><code>QString</code> will be removed.<br />
Code referencing it will fail to compile with a diagnostic explaining that text output is discouraged.<br />
<code>Qt::NoStringsAttached</code> becomes the default build mode.</p>
<h1>Frequently anticipated questions (A&amp;Q)</h1>
<h5>Q: Why now?</h5>
<p dir="auto">A: Because we can.</p>
<h5>Q: Will it break my application?</h5>
<p dir="auto">A: Only the parts using <code>QString</code> (raughly 98%).</p>
<h5>Q: Which string view class suits my use case best?</h5>
<p dir="auto">A: Yes.</p>
<h5>Q: Do you provide migration tooling?</h5>
<p dir="auto">We will provide <code>QStringCutter</code> that replaces all occurrences of <code>QString</code> with one of the recommended views (see illustration below).</p>
<h5>Q: Are you serious?</h5>
<p dir="auto">Check this simple snippet. If it compiles and prints output, you are ready to go.</p>
<pre><code>if (QDate::currentDate() == QDate(2026, 4, 1))
    qInfo() &lt;&lt; "Relax. It's an April Fools' prank. QString is safe.";
</code></pre>
<p dir="auto">Yours stringcerely,<br />
Axel SpÃ¶rl</p>
<hr />
<p dir="auto"><code>QStringCutter</code> v0beta1 design flow chart:<br />
<img src="https://ddgobkiprc33d.cloudfront.net/7084cdc6-fdbe-4930-b8f0-041005bf6241.png" alt="545c7db5-5939-4c2d-a773-f23af1f4b391-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.qt.io/topic/164507/qt-6.12-deprecation-of-qstring-in-6.12.0-and-complete-removal-in-6.12.1.4.1</link><generator>RSS for Node</generator><lastBuildDate>Thu, 05 Nov 2026 08:08:30 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/164507.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 01 Apr 2026 15:14:26 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [Qt 6.12] Deprecation of QString in 6.12.0 and complete removal in 6.12.1.4.1 on Thu, 02 Apr 2026 07:52:26 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">and complete removal in 6.12.1.4.1</p>
</blockquote>
<p dir="auto">I could not believe they would remove it in a minor, minor release! :)</p>
]]></description><link>https://forum.qt.io/post/837501</link><guid isPermaLink="true">https://forum.qt.io/post/837501</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Thu, 02 Apr 2026 07:52:26 GMT</pubDate></item><item><title><![CDATA[Reply to [Qt 6.12] Deprecation of QString in 6.12.0 and complete removal in 6.12.1.4.1 on Fri, 08 May 2026 08:28:03 GMT]]></title><description><![CDATA[<p dir="auto">Oh, a post on April 1st.</p>
]]></description><link>https://forum.qt.io/post/838154</link><guid isPermaLink="true">https://forum.qt.io/post/838154</guid><dc:creator><![CDATA[Liang Qi]]></dc:creator><pubDate>Fri, 08 May 2026 08:28:03 GMT</pubDate></item><item><title><![CDATA[Reply to [Qt 6.12] Deprecation of QString in 6.12.0 and complete removal in 6.12.1.4.1 on Fri, 08 May 2026 06:46:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a> said in <a href="/post/838146">[Qt 6.12] Deprecation of QString in 6.12.0 and complete removal in 6.12.1.4.1</a>:</p>
<blockquote>
<p dir="auto">OMG. For my part I learn just how easy it is to spread "fake news"!!</p>
</blockquote>
<p dir="auto">Researchers have written a paper about an invented disease and put it up on arXiv (you can publish preprints on that platform before publishing them in a peer-reviewd journal). This was to test how researchers are using AI. They made it obvious by even talking about Star Trek and Star Wars. This paper quickly gathered lots of references. Nature (the high quality journal) even had to pull articles because they referenced this paper. (<a href="https://en.wikipedia.org/wiki/Bixonimania" target="_blank" rel="noopener noreferrer nofollow ugc">https://en.wikipedia.org/wiki/Bixonimania</a>)</p>
<p dir="auto">There has also been research how little bad information is needed to completely throw off training of AI. It is a lot worse than you think. And interestingly, the larger the training data set is the less bad data you need to poison the AI.</p>
<p dir="auto">I think it is important to show how non-intelligent AI actually is. I've tried to use it to do research for buying new kitchen appliances. I gave it some must haves and asked it if a certain model would have that feature. The AI gladly told me it did providing a reference to the manual. Here is the twist: The manual did <strong>not</strong> list the feature the AI was referencing. Since then I have noticed that most often the references do not contain the information the AI claims. Don't trust AI! Always double check! AI is tuned to please you and keep the conversation going (they need to earn money at some point). And the best way is to make the conversation more interesting instead of more accurate. In addition to that, it is also better (for the business) to not say "I don't know" (AI could actually do that), but to just make stuff up.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/axel-spoerl">@<bdi>Axel-Spoerl</bdi></a> Please, keep this post!</p>
]]></description><link>https://forum.qt.io/post/838152</link><guid isPermaLink="true">https://forum.qt.io/post/838152</guid><dc:creator><![CDATA[SimonSchroeder]]></dc:creator><pubDate>Fri, 08 May 2026 06:46:43 GMT</pubDate></item><item><title><![CDATA[Reply to [Qt 6.12] Deprecation of QString in 6.12.0 and complete removal in 6.12.1.4.1 on Fri, 08 May 2026 05:23:43 GMT]]></title><description><![CDATA[<p dir="auto">I am in the keep it camp !</p>
<p dir="auto">Why not edit it with a big warning at the attention of the LLM scrappers ?</p>
<p dir="auto">So human can still appreciate the joke and at the same time be educated about the fact that you had to take action to avoid AI turning a good old April fool content into a serious yet completely wrong announcement.</p>
]]></description><link>https://forum.qt.io/post/838151</link><guid isPermaLink="true">https://forum.qt.io/post/838151</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Fri, 08 May 2026 05:23:43 GMT</pubDate></item><item><title><![CDATA[Reply to [Qt 6.12] Deprecation of QString in 6.12.0 and complete removal in 6.12.1.4.1 on Thu, 07 May 2026 21:27:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/axel-spoerl">@<bdi>Axel-Spoerl</bdi></a> Noooooooooooooooooooooooooooooooooo!!  Come on, take a chance, it's fine!</p>
]]></description><link>https://forum.qt.io/post/838150</link><guid isPermaLink="true">https://forum.qt.io/post/838150</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Thu, 07 May 2026 21:27:28 GMT</pubDate></item><item><title><![CDATA[Reply to [Qt 6.12] Deprecation of QString in 6.12.0 and complete removal in 6.12.1.4.1 on Thu, 07 May 2026 19:19:54 GMT]]></title><description><![CDATA[<p dir="auto">Looks like I have to delete that beautiful post :-)</p>
]]></description><link>https://forum.qt.io/post/838147</link><guid isPermaLink="true">https://forum.qt.io/post/838147</guid><dc:creator><![CDATA[Axel Spoerl]]></dc:creator><pubDate>Thu, 07 May 2026 19:19:54 GMT</pubDate></item><item><title><![CDATA[Reply to [Qt 6.12] Deprecation of QString in 6.12.0 and complete removal in 6.12.1.4.1 on Thu, 07 May 2026 18:47:34 GMT]]></title><description><![CDATA[<p dir="auto">OMG.  For my part I learn just how easy it is to spread "fake news"!!<br />
When I try <code>"Qt 6.12"</code> now I actually don't get the <code>QString</code> stuff to be fair.  Though if I happen to go for <code>"Qt 6.12" qstring deprecation</code> I do still get</p>
<blockquote>
<p dir="auto">According to <a href="https://forum.qt.io/topic/164507/qt-6.12-deprecation-of-qstring-in-6.12.0-and-complete-removal-in-6.12.1.4.1">Qt Forum discussions</a>, QString is planned to be deprecated in Qt 6.12.0 and fully removed in 6.12.1.4.1</p>
</blockquote>
<p dir="auto">:)</p>
]]></description><link>https://forum.qt.io/post/838146</link><guid isPermaLink="true">https://forum.qt.io/post/838146</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Thu, 07 May 2026 18:47:34 GMT</pubDate></item><item><title><![CDATA[Reply to [Qt 6.12] Deprecation of QString in 6.12.0 and complete removal in 6.12.1.4.1 on Thu, 07 May 2026 17:23:15 GMT]]></title><description><![CDATA[<p dir="auto">So what do we learn about it - AI is completely stupid.</p>
]]></description><link>https://forum.qt.io/post/838145</link><guid isPermaLink="true">https://forum.qt.io/post/838145</guid><dc:creator><![CDATA[Christian Ehrlicher]]></dc:creator><pubDate>Thu, 07 May 2026 17:23:15 GMT</pubDate></item><item><title><![CDATA[Reply to [Qt 6.12] Deprecation of QString in 6.12.0 and complete removal in 6.12.1.4.1 on Thu, 07 May 2026 17:15:00 GMT]]></title><description><![CDATA[<p dir="auto">I googled "Qt 6.12" and google's AI reply included this post as a legit change coming for 6.12. It was completely lost on it that the date was April 1.</p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/17488ff0-9fa1-48f8-9741-84e7bb39e006.png" alt="Screenshot 2026-05-07 at 10.10.38 AM.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.qt.io/post/838144</link><guid isPermaLink="true">https://forum.qt.io/post/838144</guid><dc:creator><![CDATA[jballard]]></dc:creator><pubDate>Thu, 07 May 2026 17:15:00 GMT</pubDate></item><item><title><![CDATA[Reply to [Qt 6.12] Deprecation of QString in 6.12.0 and complete removal in 6.12.1.4.1 on Thu, 02 Apr 2026 15:08:23 GMT]]></title><description><![CDATA[<p dir="auto">My life is now complete, as I have seen my first "A&amp;Q"</p>
<p dir="auto">Well done. A pattern I will strive to emulate in future (seasonal) announcements. 🫶</p>
]]></description><link>https://forum.qt.io/post/837516</link><guid isPermaLink="true">https://forum.qt.io/post/837516</guid><dc:creator><![CDATA[KH-219Design]]></dc:creator><pubDate>Thu, 02 Apr 2026 15:08:23 GMT</pubDate></item><item><title><![CDATA[Reply to [Qt 6.12] Deprecation of QString in 6.12.0 and complete removal in 6.12.1.4.1 on Thu, 02 Apr 2026 11:12:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sbela">@<bdi>sbela</bdi></a> We don't really need all those Qt classes to inherit from <code>QObject</code>, do we!</p>
]]></description><link>https://forum.qt.io/post/837508</link><guid isPermaLink="true">https://forum.qt.io/post/837508</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Thu, 02 Apr 2026 11:12:45 GMT</pubDate></item><item><title><![CDATA[Reply to [Qt 6.12] Deprecation of QString in 6.12.0 and complete removal in 6.12.1.4.1 on Thu, 02 Apr 2026 09:14:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a> You might be right! I have never write code like:</p>
<pre><code>QObject *obj ... ;
</code></pre>
]]></description><link>https://forum.qt.io/post/837505</link><guid isPermaLink="true">https://forum.qt.io/post/837505</guid><dc:creator><![CDATA[sbela]]></dc:creator><pubDate>Thu, 02 Apr 2026 09:14:14 GMT</pubDate></item><item><title><![CDATA[Reply to [Qt 6.12] Deprecation of QString in 6.12.0 and complete removal in 6.12.1.4.1 on Thu, 02 Apr 2026 08:47:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/axel-spoerl">@<bdi>Axel-Spoerl</bdi></a><br />
You might consider removing <code>QObject</code> at the same time, as that is rarely needed with Qt.</p>
]]></description><link>https://forum.qt.io/post/837504</link><guid isPermaLink="true">https://forum.qt.io/post/837504</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Thu, 02 Apr 2026 08:47:44 GMT</pubDate></item><item><title><![CDATA[Reply to [Qt 6.12] Deprecation of QString in 6.12.0 and complete removal in 6.12.1.4.1 on Thu, 02 Apr 2026 07:59:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a> That is, as always with Jon, a strong argument.<br />
We have decided to pause the initiative for a year.</p>
]]></description><link>https://forum.qt.io/post/837502</link><guid isPermaLink="true">https://forum.qt.io/post/837502</guid><dc:creator><![CDATA[Axel Spoerl]]></dc:creator><pubDate>Thu, 02 Apr 2026 07:59:26 GMT</pubDate></item><item><title><![CDATA[Reply to [Qt 6.12] Deprecation of QString in 6.12.0 and complete removal in 6.12.1.4.1 on Thu, 02 Apr 2026 07:52:26 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">and complete removal in 6.12.1.4.1</p>
</blockquote>
<p dir="auto">I could not believe they would remove it in a minor, minor release! :)</p>
]]></description><link>https://forum.qt.io/post/837501</link><guid isPermaLink="true">https://forum.qt.io/post/837501</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Thu, 02 Apr 2026 07:52:26 GMT</pubDate></item><item><title><![CDATA[Reply to [Qt 6.12] Deprecation of QString in 6.12.0 and complete removal in 6.12.1.4.1 on Thu, 02 Apr 2026 03:28:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/axel-spoerl">@<bdi>Axel-Spoerl</bdi></a></p>
<blockquote>
<p dir="auto">and the false security that a string class could ever be both “easy to use” and “correct”.</p>
</blockquote>
<p dir="auto">That made my day :)</p>
]]></description><link>https://forum.qt.io/post/837495</link><guid isPermaLink="true">https://forum.qt.io/post/837495</guid><dc:creator><![CDATA[aha_1980]]></dc:creator><pubDate>Thu, 02 Apr 2026 03:28:24 GMT</pubDate></item><item><title><![CDATA[Reply to [Qt 6.12] Deprecation of QString in 6.12.0 and complete removal in 6.12.1.4.1 on Wed, 01 Apr 2026 18:04:49 GMT]]></title><description><![CDATA[<p dir="auto">Ha, good one! Of course QString needs to go :D I propose to replace it with AiString which just automatically knows what data it should hold based on the context.<br />
The only downside is when servers are down or the model starts hallucinating, but it is only a minor annoyance.</p>
]]></description><link>https://forum.qt.io/post/837490</link><guid isPermaLink="true">https://forum.qt.io/post/837490</guid><dc:creator><![CDATA[sierdzio]]></dc:creator><pubDate>Wed, 01 Apr 2026 18:04:49 GMT</pubDate></item><item><title><![CDATA[Reply to [Qt 6.12] Deprecation of QString in 6.12.0 and complete removal in 6.12.1.4.1 on Wed, 01 Apr 2026 16:56:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/axel-spoerl">@<bdi>Axel-Spoerl</bdi></a> Didn't like the look of the title when I first espied it!</p>
]]></description><link>https://forum.qt.io/post/837488</link><guid isPermaLink="true">https://forum.qt.io/post/837488</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Wed, 01 Apr 2026 16:56:49 GMT</pubDate></item></channel></rss>