<?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[Is possible a component QWidget into QML&#x2F;QtQuick 2.0.?]]></title><description><![CDATA[<p dir="auto">Re: <a href="/topic/57444/is-it-possible-to-integrate-a-qwidget-into-qml-qtquick-2-0">Is it possible to integrate a QWidget into QML/QtQuick 2.0.</a></p>
<p dir="auto">Good Morning,<br />
Can i put component QTreeWidget into a QML file ?</p>
]]></description><link>https://forum.qt.io/topic/95603/is-possible-a-component-qwidget-into-qml-qtquick-2-0</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Apr 2026 05:26:03 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/95603.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 16 Oct 2018 06:31:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Is possible a component QWidget into QML&#x2F;QtQuick 2.0.? on Wed, 17 Oct 2018 06:03:40 GMT]]></title><description><![CDATA[<p dir="auto">Good morning, here in Italy are 7.50 A.M.<br />
The path of the model was started and also in the document "Using C ++ Models with Qt Quick" no reference is made to images or icons. Perhaps deepening is successful but I have not found any examples.<br />
I used the QStandardItemModel because it indicated the possibility to associate an icon with the item.</p>
<pre><code>QStandardItemModel 
The QStandardItem class provides an item for use with the QStandardItemModel class

QStandardItem(const QIcon &amp; icon, const QString &amp; text)
</code></pre>
<p dir="auto">Thanks for the indications of the Widget, I will ask the project manager if you can insert a widget not standard libraries.</p>
<p dir="auto">As I have little time and since I'm working with WebEngine I will create the tree with an html page.<br />
Thanks to everyone</p>
]]></description><link>https://forum.qt.io/post/487350</link><guid isPermaLink="true">https://forum.qt.io/post/487350</guid><dc:creator><![CDATA[elicat]]></dc:creator><pubDate>Wed, 17 Oct 2018 06:03:40 GMT</pubDate></item><item><title><![CDATA[Reply to Is possible a component QWidget into QML&#x2F;QtQuick 2.0.? on Tue, 16 Oct 2018 17:40:17 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">You might want to take a look at KDAB's <a href="https://www.kdab.com/declarative-widgets/" target="_blank" rel="noopener noreferrer nofollow ugc">Declarative Widget project</a>.</p>
]]></description><link>https://forum.qt.io/post/487293</link><guid isPermaLink="true">https://forum.qt.io/post/487293</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Tue, 16 Oct 2018 17:40:17 GMT</pubDate></item><item><title><![CDATA[Reply to Is possible a component QWidget into QML&#x2F;QtQuick 2.0.? on Tue, 16 Oct 2018 15:47:20 GMT]]></title><description><![CDATA[<p dir="auto">In QML, you're responsible to populate the delegates yourself. <a href="https://doc.qt.io/qt-5/qml-qtquick-controls-treeview.html#itemDelegate-prop" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-5/qml-qtquick-controls-treeview.html#itemDelegate-prop</a> You can add an Image component in the delegate and pass the path to your image through the model. Here's a tutorial for that <a href="https://doc.qt.io/qt-5/qtquick-modelviewsdata-cppmodels.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-5/qtquick-modelviewsdata-cppmodels.html</a></p>
<p dir="auto">This does not looks very easy to do (I've never used TreeView in QML myself, though).</p>
]]></description><link>https://forum.qt.io/post/487284</link><guid isPermaLink="true">https://forum.qt.io/post/487284</guid><dc:creator><![CDATA[sierdzio]]></dc:creator><pubDate>Tue, 16 Oct 2018 15:47:20 GMT</pubDate></item><item><title><![CDATA[Reply to Is possible a component QWidget into QML&#x2F;QtQuick 2.0.? on Tue, 16 Oct 2018 11:13:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sierdzio">@<bdi>sierdzio</bdi></a></p>
<p dir="auto">Good Morning, <a class="plugin-mentions-user plugin-mentions-a" href="/user/sierdzio">@<bdi>sierdzio</bdi></a><br />
Yes, I tried with treeView but I could not change the icon.<br />
As I feed the treeview by reading a database table I have created a model</p>
<pre><code>QStandardItem * item = new QStandardItem (QIcon ("qrc: /images/imagefolder.png"), "text item");
</code></pre>
<p dir="auto">Maybe I did not understand how to use the QIcon display?</p>
]]></description><link>https://forum.qt.io/post/487248</link><guid isPermaLink="true">https://forum.qt.io/post/487248</guid><dc:creator><![CDATA[elicat]]></dc:creator><pubDate>Tue, 16 Oct 2018 11:13:43 GMT</pubDate></item><item><title><![CDATA[Reply to Is possible a component QWidget into QML&#x2F;QtQuick 2.0.? on Tue, 16 Oct 2018 07:32:07 GMT]]></title><description><![CDATA[<p dir="auto">No, you can't.</p>
<p dir="auto">But there is a TreeView in QML: <a href="https://doc.qt.io/qt-5/qml-qtquick-controls-treeview.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-5/qml-qtquick-controls-treeview.html</a></p>
]]></description><link>https://forum.qt.io/post/487174</link><guid isPermaLink="true">https://forum.qt.io/post/487174</guid><dc:creator><![CDATA[sierdzio]]></dc:creator><pubDate>Tue, 16 Oct 2018 07:32:07 GMT</pubDate></item></channel></rss>