<?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[QHash remove item while iterating?]]></title><description><![CDATA[<p dir="auto">I'm interating through a QHash and I want to modify the key of an item as I find it.<br />
e.g.</p>
<pre><code>if (i.key() == 123) then { 
   // remove this item to reinsert later with a key of 456
}
</code></pre>
<p dir="auto">However can I remove the item during the iteration?<br />
Or better yet, is there a way to modify the key on the fly without doing a remove+insert?</p>
]]></description><link>https://forum.qt.io/topic/131525/qhash-remove-item-while-iterating</link><generator>RSS for Node</generator><lastBuildDate>Fri, 23 Oct 2026 17:04:20 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/131525.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 29 Oct 2021 05:16:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QHash remove item while iterating? on Fri, 29 Oct 2021 06:18:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/publicnamer">@<bdi>Publicnamer</bdi></a> It's all in the documentation: <a href="https://doc.qt.io/qt-5/qhash.html#erase" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-5/qhash.html#erase</a></p>
]]></description><link>https://forum.qt.io/post/687360</link><guid isPermaLink="true">https://forum.qt.io/post/687360</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Fri, 29 Oct 2021 06:18:07 GMT</pubDate></item></channel></rss>