<?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[Tree model in QML without C++]]></title><description><![CDATA[<p dir="auto">Hi</p>
<p dir="auto">can you create a model that can be used for treeview using qml only?</p>
<p dir="auto">all articles I found implement the model in c++</p>
]]></description><link>https://forum.qt.io/topic/74245/tree-model-in-qml-without-c</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Apr 2026 04:24:07 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/74245.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 13 Dec 2016 12:40:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Tree model in QML without C++ on Wed, 13 Jun 2018 14:57:31 GMT]]></title><description><![CDATA[<p dir="auto">I was stuck at the same point, "why are the example only static read-only c++ models"?</p>
<p dir="auto">I found two helpful pure QML examples for custom made tree views that use QML ListModel and Javascript arrays, e.g:</p>
<ol>
<li></li>
</ol>
<p dir="auto"><a href="https://www.youtube.com/watch?v=zb8kPCP_Epo" target="_blank" rel="noopener noreferrer nofollow ugc">Youtube - TreeView component in pure Qt Quick</a><br />
<a href="https://gist.github.com/pcdummy/c03845aa9449168b7d24c491ad913fce" target="_blank" rel="noopener noreferrer nofollow ugc">https://gist.github.com/pcdummy/c03845aa9449168b7d24c491ad913fce</a></p>
<ol start="2">
<li></li>
</ol>
<p dir="auto"><a href="https://github.com/MrEricSir/QMLRearrangeableTreeView" target="_blank" rel="noopener noreferrer nofollow ugc">QMLRearrangeableTreeView</a> from Eric Gregory which showcases drag&amp;drop. I extended it to make it editable, and save/load the structure via a JSON string:<br />
<a href="https://github.com/FullmoOliver/QMLRearrangeableTreeView/wiki" target="_blank" rel="noopener noreferrer nofollow ugc">QMLRearrangeableTreeView for edit&amp;save</a></p>
<p dir="auto">Hope this can help.</p>
]]></description><link>https://forum.qt.io/post/463460</link><guid isPermaLink="true">https://forum.qt.io/post/463460</guid><dc:creator><![CDATA[Oliver Heggelbacher]]></dc:creator><pubDate>Wed, 13 Jun 2018 14:57:31 GMT</pubDate></item><item><title><![CDATA[Reply to Tree model in QML without C++ on Thu, 15 Dec 2016 12:20:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/krasi">@<bdi>Krasi</bdi></a><br />
Hi<br />
I think you need to use c++ for that.<br />
Sadly.</p>
]]></description><link>https://forum.qt.io/post/364573</link><guid isPermaLink="true">https://forum.qt.io/post/364573</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Thu, 15 Dec 2016 12:20:15 GMT</pubDate></item><item><title><![CDATA[Reply to Tree model in QML without C++ on Thu, 15 Dec 2016 12:17:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mrjj">@<bdi>mrjj</bdi></a> thanks but this is for list model. I am interested in treemodel with parent-child relations</p>
]]></description><link>https://forum.qt.io/post/364572</link><guid isPermaLink="true">https://forum.qt.io/post/364572</guid><dc:creator><![CDATA[Krasi]]></dc:creator><pubDate>Thu, 15 Dec 2016 12:17:12 GMT</pubDate></item><item><title><![CDATA[Reply to Tree model in QML without C++ on Tue, 13 Dec 2016 15:24:25 GMT]]></title><description><![CDATA[<p dir="auto">Hi<br />
Im not QML user but the only thing about pure QML models i could find was this<br />
<a href="http://doc.qt.io/qt-5/qtquick-xmllistmodel-qmlmodule.html" target="_blank" rel="noopener noreferrer nofollow ugc">http://doc.qt.io/qt-5/qtquick-xmllistmodel-qmlmodule.html</a><br />
So not sure you can defien new models in QML alone.<br />
Could be cool though :)</p>
]]></description><link>https://forum.qt.io/post/364205</link><guid isPermaLink="true">https://forum.qt.io/post/364205</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Tue, 13 Dec 2016 15:24:25 GMT</pubDate></item></channel></rss>