<?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[Problem resetting a qquickwidget]]></title><description><![CDATA[<p dir="auto">Hi,<br />
I have a qml creating items dynamically with different functions, so I cannot track them.  I am putting this qml inside a QQuickWidget and every time I want t reset it I was simply adding a new resource. Like this: ui-&gt;quickwidget-&gt;setSource(QUrl(QStringLiteral("main.qml"))). It was working fine, but now I have a problem that it appears to be deleting before qml could handle all signals. This is the error:<br />
Object 0x463b10 destroyed while one of its QML signal handlers is in progress.<br />
Most likely the object was deleted synchronously (use QObject::deleteLater() instead), or the application is running a nested event loop.<br />
This behavior is NOT supported!<br />
I would like to know if someone knows how to use deleteLater on qquickwidget or another way to reset my qml inside my quickwidget.<br />
Thank you all.</p>
]]></description><link>https://forum.qt.io/topic/107232/problem-resetting-a-qquickwidget</link><generator>RSS for Node</generator><lastBuildDate>Tue, 05 May 2026 08:17:32 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/107232.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 26 Sep 2019 18:47:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem resetting a qquickwidget on Fri, 27 Sep 2019 16:36:43 GMT]]></title><description><![CDATA[<p dir="auto">I solved it by using delete later. Just in case someone have the same problem, here is my solution code:</p>
<p dir="auto">ui-&gt;qml-&gt;rootObject()-&gt;deleteLater();</p>
<p dir="auto">connect(ui-&gt;qml-&gt;rootObject(), &amp;QObject::destroyed, this, [=] {<br />
ui-&gt;qml-&gt;setSource(QUrl(QStringLiteral("main.qml")));</p>
<pre><code>emit apagou();
</code></pre>
<p dir="auto">});</p>
]]></description><link>https://forum.qt.io/post/553293</link><guid isPermaLink="true">https://forum.qt.io/post/553293</guid><dc:creator><![CDATA[Amanda1102]]></dc:creator><pubDate>Fri, 27 Sep 2019 16:36:43 GMT</pubDate></item></channel></rss>