<?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[returning list to QML]]></title><description><![CDATA[<p dir="auto">Hi,<br />
I'm having trouble returning list from python to QML.<br />
it's ok with <code>@Property("QVariantList", notify=someNotifier)</code> but I can't make it work with something like <code>@Slot(resultat=list)</code> or <code>Slot(result = "QVariantList")</code>.<br />
Thanks for help :-)</p>
]]></description><link>https://forum.qt.io/topic/110528/returning-list-to-qml</link><generator>RSS for Node</generator><lastBuildDate>Mon, 26 Oct 2026 18:31:45 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/110528.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 10 Jan 2020 08:37:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to returning list to QML on Mon, 13 Jan 2020 20:05:27 GMT]]></title><description><![CDATA[<p dir="auto">My bad, it's ok, I had to specify <code>QVariantList</code> in result and not <code>list</code>.</p>
]]></description><link>https://forum.qt.io/post/572183</link><guid isPermaLink="true">https://forum.qt.io/post/572183</guid><dc:creator><![CDATA[Jim Gir]]></dc:creator><pubDate>Mon, 13 Jan 2020 20:05:27 GMT</pubDate></item><item><title><![CDATA[Reply to returning list to QML on Sat, 11 Jan 2020 18:08:03 GMT]]></title><description><![CDATA[<p dir="auto">Please provide a complete minimal test case including the qml you are using.</p>
]]></description><link>https://forum.qt.io/post/571875</link><guid isPermaLink="true">https://forum.qt.io/post/571875</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Sat, 11 Jan 2020 18:08:03 GMT</pubDate></item><item><title><![CDATA[Reply to returning list to QML on Sat, 11 Jan 2020 00:18:58 GMT]]></title><description><![CDATA[<pre><code>class Some(QObject):
  
   fakenotify = Signal()

   @Property('QVariantList', notify=fakenotify2)
    def withprop(self):
        with db_session:
            return self.db.Page.recents()

    @Slot(result=list)
    def withslot(self):
        with db_session:
            return self.db.Page.recents()
</code></pre>
<p dir="auto">in some ListView using as model:<br />
<code>some.withprop</code> works<br />
but<br />
<code>some.whithslot()</code> fails with  : <code>qrc:/qml/main.qml:54: TypeError: Cannot call method 'withslot' of null</code></p>
]]></description><link>https://forum.qt.io/post/571811</link><guid isPermaLink="true">https://forum.qt.io/post/571811</guid><dc:creator><![CDATA[Jim Gir]]></dc:creator><pubDate>Sat, 11 Jan 2020 00:18:58 GMT</pubDate></item><item><title><![CDATA[Reply to returning list to QML on Fri, 10 Jan 2020 23:16:45 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">You should provide a minimal code example that shows your problem.</p>
]]></description><link>https://forum.qt.io/post/571805</link><guid isPermaLink="true">https://forum.qt.io/post/571805</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Fri, 10 Jan 2020 23:16:45 GMT</pubDate></item></channel></rss>