<?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[Please show me how to iterate QMap&lt;QString ,QList&lt;structure *&gt;&gt; obj in Qt ?]]></title><description><![CDATA[<p dir="auto">Please show me how to iterate QMap&lt;QString ,QList&lt;structure *&gt;&gt; obj in Qt ?</p>
]]></description><link>https://forum.qt.io/topic/110682/please-show-me-how-to-iterate-qmap-qstring-qlist-structure-obj-in-qt</link><generator>RSS for Node</generator><lastBuildDate>Sun, 11 Oct 2026 20:46:14 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/110682.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 15 Jan 2020 10:17:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Please show me how to iterate QMap&lt;QString ,QList&lt;structure *&gt;&gt; obj in Qt ? on Wed, 15 Jan 2020 12:22:34 GMT]]></title><description><![CDATA[<p dir="auto">@avinash-r-p</p>
<p dir="auto">I guess you have problems iterating your combination of these containers?!<br />
If you know how to iterate through a <code>QMap</code>, replace (in your head) <code>QList&lt;struct *&gt;</code> with a primitive data type (like an integer). Then think about it, how it would look like and what you need to change, if you replace your <code>obj.value</code> with a complex datatype (your mapped <code>QList</code> of <code>structure *</code> structs instead of an <code>int</code>).<br />
It's not that hard :-) <a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a> already provided useful links which will show you how to iterate through every of your mentioned containers. You just need to combine them.</p>
]]></description><link>https://forum.qt.io/post/572438</link><guid isPermaLink="true">https://forum.qt.io/post/572438</guid><dc:creator><![CDATA[Pl45m4]]></dc:creator><pubDate>Wed, 15 Jan 2020 12:22:34 GMT</pubDate></item><item><title><![CDATA[Reply to Please show me how to iterate QMap&lt;QString ,QList&lt;structure *&gt;&gt; obj in Qt ? on Wed, 15 Jan 2020 10:34:51 GMT]]></title><description><![CDATA[<p dir="auto">@avinash-r-p<br />
Not sure which you mean, but <code>QMap</code> can be iterated via <a href="https://doc.qt.io/qt-5/qmap-iterator.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-5/qmap-iterator.html</a>, and <code>QList</code> via <a href="https://doc.qt.io/qt-5/qlist-iterator.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-5/qlist-iterator.html</a>.  You access a map item's value via <a href="https://doc.qt.io/qt-5/qmap-iterator.html#value" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-5/qmap-iterator.html#value</a>.  See also <a href="https://stackoverflow.com/questions/8517853/iterating-over-a-qmap-with-for" target="_blank" rel="noopener noreferrer nofollow ugc">https://stackoverflow.com/questions/8517853/iterating-over-a-qmap-with-for</a> for an example.  Not sure what else there is to say...</p>
]]></description><link>https://forum.qt.io/post/572432</link><guid isPermaLink="true">https://forum.qt.io/post/572432</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Wed, 15 Jan 2020 10:34:51 GMT</pubDate></item></channel></rss>