<?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[Error when closing application in Qt4.8 using QDeclarative and QML]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">I am having some trouble when I close my application I get an error. I am defining a new QML element by QDeclarativeItem and sharing a property through Q_PROPERTY. My class looks like this:</p>
<p dir="auto">@class PluginName : public QDeclarativeItem<br />
{<br />
Q_OBJECT<br />
Q_PROPERTY (QString pluginName READ m_sGetPluginName WRITE m_vSetPluginName)</p>
<p dir="auto">public:<br />
//PluginPage(QDeclarativeItem* poParent = NULL);<br />
//~PluginPage();<br />
void m_vSetPluginName (const QString&amp; sName);<br />
QString m_sGetPluginName () const;</p>
<p dir="auto">private:<br />
QString m_sPluginName;<br />
};@</p>
<p dir="auto">And in the .cpp:</p>
<p dir="auto">@void PluginName::m_vSetPluginName (const QString&amp; sName)<br />
{<br />
m_sPluginName = sName;<br />
}</p>
<p dir="auto">QString PluginName::m_sGetPluginName () const<br />
{<br />
return m_sPluginName;<br />
}@</p>
<p dir="auto">Also My .qml</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/import">@<bdi>import</bdi></a> QtQuick 1.1<br />
import Simu 1.0</p>
<p dir="auto">Item{<br />
id: mainWindow<br />
objectName: "item"<br />
width:1000<br />
height:600</p>
<p dir="auto">PluginName<br />
{<br />
pluginName:"name"<br />
}</p>
<pre><code>Rectangle
{
    id: idMyWindow                   // unique identifier for this button
</code></pre>
<p dir="auto">objectName: "rect"<br />
color: "blue"                   // backgrond color<br />
width: 800                      // window size<br />
height: 600<br />
x: 10                           // x-absolute position from parent &lt;mainWindow&gt;<br />
y: 20                           // y-absolute position from parent &lt;mainWindow&gt;</p>
<pre><code>}
</code></pre>
<p dir="auto">}@</p>
<p dir="auto">I am also using "qmlRegisterType" to register my PluginName class.</p>
<p dir="auto">If I don't use my new QML element then I don't get the heap error I wonder what is wrong :(</p>
<p dir="auto">This is the error, I am using MSVC 2005:</p>
<p dir="auto">"Windows has triggered a breakpoint in _visufrwk_proj.exe.</p>
<p dir="auto">This may be due to a corruption of the heap, and indicates a bug in _visufrwk_proj.exe or any of the DLLs it has loaded.</p>
<p dir="auto">The output window may have more diagnostic information"</p>
<p dir="auto">Hopefully someone could share some knowledge.<br />
Thanks in advance.</p>
]]></description><link>https://forum.qt.io/topic/31006/error-when-closing-application-in-qt4-8-using-qdeclarative-and-qml</link><generator>RSS for Node</generator><lastBuildDate>Tue, 06 Oct 2026 20:51:47 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/31006.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 21 Aug 2013 22:35:06 GMT</pubDate><ttl>60</ttl></channel></rss>