<?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[Json parsing into qtreewidget]]></title><description><![CDATA[<p dir="auto">I'm having json format like this.<br />
Json:<br />
[<br />
{ "id": "5001", "type": ["none"] },<br />
{ "id": "5002", "type": ["glazed", "sugar"]},<br />
{ "id": "5003", "type": ["glazed", "chocolate", "sugar"] },<br />
{ "id": "5004", "type": ["powdered sugar", "chocolate", "sugar"] },<br />
{ "id": "5004", "type": ["chocolate with sprinkles", "maple"]},<br />
{ "id": "5005", "type": [" None", "chocolate", "glazed", "sugar", "powdered sugar"] }<br />
]</p>
<p dir="auto">I'm trying to get id values in parent and type values in child in qtree widget.<br />
Please anyone help me with code and example.</p>
]]></description><link>https://forum.qt.io/topic/141401/json-parsing-into-qtreewidget</link><generator>RSS for Node</generator><lastBuildDate>Sun, 07 Jun 2026 03:56:03 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/141401.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 11 Dec 2022 14:52:18 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Json parsing into qtreewidget on Sun, 11 Dec 2022 16:17:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/steve07">@<bdi>Steve07</bdi></a><br />
Yours may be slightly different.  You only have one occurrence of a given <em>parent</em>, in the data you show.  Therefore you would not have the issue of needing to recognise a <em>duplicate</em> row/id, to re-use as the parent to another row, which was the point of a map.  Yours looks even simpler.</p>
]]></description><link>https://forum.qt.io/post/739864</link><guid isPermaLink="true">https://forum.qt.io/post/739864</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Sun, 11 Dec 2022 16:17:12 GMT</pubDate></item><item><title><![CDATA[Reply to Json parsing into qtreewidget on Sun, 11 Dec 2022 16:13:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a> yes. That was a similar one.<br />
I haven't studied Qmap yet. So I'll try this after studying</p>
]]></description><link>https://forum.qt.io/post/739862</link><guid isPermaLink="true">https://forum.qt.io/post/739862</guid><dc:creator><![CDATA[Steve07]]></dc:creator><pubDate>Sun, 11 Dec 2022 16:13:43 GMT</pubDate></item><item><title><![CDATA[Reply to Json parsing into qtreewidget on Sun, 11 Dec 2022 15:47:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/steve07">@<bdi>Steve07</bdi></a></p>
<p dir="auto">Follow this example:<br />
<a href="https://www.bogotobogo.com/Qt/Qt5_QTreeWidget.php" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.bogotobogo.com/Qt/Qt5_QTreeWidget.php</a></p>
<p dir="auto">It's dam easy :)</p>
]]></description><link>https://forum.qt.io/post/739861</link><guid isPermaLink="true">https://forum.qt.io/post/739861</guid><dc:creator><![CDATA[mpergand]]></dc:creator><pubDate>Sun, 11 Dec 2022 15:47:11 GMT</pubDate></item><item><title><![CDATA[Reply to Json parsing into qtreewidget on Sun, 11 Dec 2022 15:30:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/steve07">@<bdi>Steve07</bdi></a><br />
People seem to be asking the same question.  Is your situation the same as that answered by <a href="https://forum.qt.io/topic/141394/how-to-fetch-muliple-children-inside-a-parents-which-belongs-to-same-parent-in-treewidget/2">https://forum.qt.io/topic/141394/how-to-fetch-muliple-children-inside-a-parents-which-belongs-to-same-parent-in-treewidget/2</a> ?</p>
<p dir="auto">Assuming you mean you want a separate child for each item in the "type values" (do you?), just add one node for each line/row/id and add a separate child for each item in the "type list".  Very straightforward.</p>
]]></description><link>https://forum.qt.io/post/739857</link><guid isPermaLink="true">https://forum.qt.io/post/739857</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Sun, 11 Dec 2022 15:30:23 GMT</pubDate></item></channel></rss>