<?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[Using values set in QML properties as delegates that are used by C++ QtQuick object]]></title><description><![CDATA[<p dir="auto">I am writing a QtQuick based C++ object.  I was wondering if there is a way to use an object set as a property of that object:</p>
<pre><code>Object {
  delegateObject: Item{}
}
</code></pre>
<p dir="auto">Where delegateObject is set to a QML object that can be used as a delegate in the QtQuick C++ object.  I am creating a C++ object so I can draw some things fast using QSGNodes, but would like to draw other things using QML objects.  I assume I would need to somehow read the nodes from the delegate and then generate them at render time.  Not sure how this would affect events.</p>
]]></description><link>https://forum.qt.io/topic/110390/using-values-set-in-qml-properties-as-delegates-that-are-used-by-c-qtquick-object</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 23:21:49 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/110390.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 06 Jan 2020 18:58:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Using values set in QML properties as delegates that are used by C++ QtQuick object on Tue, 07 Jan 2020 08:43:30 GMT]]></title><description><![CDATA[<p dir="auto">If you only need an instance of an object, use a <code>QQuickItem*</code> property. That's what Controls do for their <code>background</code> property<br />
If you need to create multiple instances use a <code>QQmlComponent*</code> property. That what views do (like ListView) for their <code>delegate</code> property.</p>
]]></description><link>https://forum.qt.io/post/570884</link><guid isPermaLink="true">https://forum.qt.io/post/570884</guid><dc:creator><![CDATA[GrecKo]]></dc:creator><pubDate>Tue, 07 Jan 2020 08:43:30 GMT</pubDate></item><item><title><![CDATA[Reply to Using values set in QML properties as delegates that are used by C++ QtQuick object on Tue, 07 Jan 2020 07:48:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/fcarney">@<bdi>fcarney</bdi></a> said in <a href="/post/570749">Using values set in QML properties as delegates that are used by C++ QtQuick object</a>:</p>
<blockquote>
<p dir="auto">delegateObject</p>
</blockquote>
<p dir="auto">Declare <code>delegateObject</code> as a pointer to QQuickItem. That part should work. However, I have no idea if/ how to the other step (pain the delegate on demand).</p>
]]></description><link>https://forum.qt.io/post/570868</link><guid isPermaLink="true">https://forum.qt.io/post/570868</guid><dc:creator><![CDATA[sierdzio]]></dc:creator><pubDate>Tue, 07 Jan 2020 07:48:07 GMT</pubDate></item></channel></rss>