<?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[Int qRegisterMetaType (const char *typeName) &amp; int qRegisterMetaType() difference]]></title><description><![CDATA[<p dir="auto">Hi! Could you please explain me what is the difference between them?</p>
]]></description><link>https://forum.qt.io/topic/10414/int-qregistermetatype-const-char-typename-int-qregistermetatype-difference</link><generator>RSS for Node</generator><lastBuildDate>Thu, 14 May 2026 13:50:54 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/10414.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 14 Oct 2011 08:35:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Int qRegisterMetaType (const char *typeName) &amp; int qRegisterMetaType() difference on Thu, 12 Apr 2012 11:29:51 GMT]]></title><description><![CDATA[<p dir="auto">qRegisterMetaType() registers type with namespace prefix, if any. You can't change it.<br />
qRegisterMetaType (const char *typeName) allows to set particular name, so you can register type w/o namespace prefix</p>
]]></description><link>https://forum.qt.io/post/125576</link><guid isPermaLink="true">https://forum.qt.io/post/125576</guid><dc:creator><![CDATA[ixSci]]></dc:creator><pubDate>Thu, 12 Apr 2012 11:29:51 GMT</pubDate></item><item><title><![CDATA[Reply to Int qRegisterMetaType (const char *typeName) &amp; int qRegisterMetaType() difference on Thu, 12 Apr 2012 11:17:54 GMT]]></title><description><![CDATA[<p dir="auto">[quote author="ixSci" date="1334222143"]<br />
Version with name and without name are really the same(one is called from another actually). With only one difference in behavior: <em>when you register type which is located in namespace it will register type with namespace prefix</em>. And qRegisterMetaType with name argument allows you to register name without namespace prefix. That is it.[/quote]</p>
<p dir="auto">Could you perhaps clarify the above (bold) a little bit more? Which version are you talking about there exactly?</p>
]]></description><link>https://forum.qt.io/post/125577</link><guid isPermaLink="true">https://forum.qt.io/post/125577</guid><dc:creator><![CDATA[andre]]></dc:creator><pubDate>Thu, 12 Apr 2012 11:17:54 GMT</pubDate></item><item><title><![CDATA[Reply to Int qRegisterMetaType (const char *typeName) &amp; int qRegisterMetaType() difference on Thu, 12 Apr 2012 09:21:29 GMT]]></title><description><![CDATA[<p dir="auto">You are fast, I was about to correct my comment :-)</p>
]]></description><link>https://forum.qt.io/post/125574</link><guid isPermaLink="true">https://forum.qt.io/post/125574</guid><dc:creator><![CDATA[Nierob]]></dc:creator><pubDate>Thu, 12 Apr 2012 09:21:29 GMT</pubDate></item><item><title><![CDATA[Reply to Int qRegisterMetaType (const char *typeName) &amp; int qRegisterMetaType() difference on Thu, 12 Apr 2012 09:15:43 GMT]]></title><description><![CDATA[<p dir="auto">Well, I've actually found the answer on this question and even wrote article about it. It is in Russian though.</p>
<p dir="auto"><em>&gt;&gt; Try to use Q_DECLARE_METATYPE() macro instead</em></p>
<p dir="auto">You can't use it <em>instead</em> you should use it in <em>conjunction</em>. qRegisterMetaType complements Q_DECLARE_METATYPE.</p>
<p dir="auto">Version with name and without name are really the same(one is called from another actually). With only one difference in behavior: when you register type which is located in namespace it will register type with namespace prefix. And qRegisterMetaType with name argument allows you to register name without namespace prefix. That is it.</p>
]]></description><link>https://forum.qt.io/post/125573</link><guid isPermaLink="true">https://forum.qt.io/post/125573</guid><dc:creator><![CDATA[ixSci]]></dc:creator><pubDate>Thu, 12 Apr 2012 09:15:43 GMT</pubDate></item><item><title><![CDATA[Reply to Int qRegisterMetaType (const char *typeName) &amp; int qRegisterMetaType() difference on Thu, 12 Apr 2012 09:06:15 GMT]]></title><description><![CDATA[<p dir="auto">I strongly advise to always use version taking name, in some places in Qt the name is checked to provide additional functionality. It is extremely important when you use QtDeclarative, QtScirpt or QtDbus.</p>
<p dir="auto">Try to use Q_DECLARE_METATYPE() macro instead, it is superior in many aspects (for example it will work with QVariant too).</p>
]]></description><link>https://forum.qt.io/post/125572</link><guid isPermaLink="true">https://forum.qt.io/post/125572</guid><dc:creator><![CDATA[Nierob]]></dc:creator><pubDate>Thu, 12 Apr 2012 09:06:15 GMT</pubDate></item><item><title><![CDATA[Reply to Int qRegisterMetaType (const char *typeName) &amp; int qRegisterMetaType() difference on Fri, 14 Oct 2011 11:45:09 GMT]]></title><description><![CDATA[<p dir="auto">It is definitely not the solely difference between them. Because with second version I have complaining in runtime in queued signals/slots. When I emit signal in one thread and capture it in other one with QSignalSpy I have a complaint when try to cast an argument to my type. I have no complaints with 1st version.</p>
]]></description><link>https://forum.qt.io/post/113288</link><guid isPermaLink="true">https://forum.qt.io/post/113288</guid><dc:creator><![CDATA[ixSci]]></dc:creator><pubDate>Fri, 14 Oct 2011 11:45:09 GMT</pubDate></item><item><title><![CDATA[Reply to Int qRegisterMetaType (const char *typeName) &amp; int qRegisterMetaType() difference on Fri, 14 Oct 2011 10:59:13 GMT]]></title><description><![CDATA[<p dir="auto">qRegisterMetaType(const char *) enables you to add a name to the meta type, so you can get the type by name as well. Probably useful on some platforms.</p>
]]></description><link>https://forum.qt.io/post/113281</link><guid isPermaLink="true">https://forum.qt.io/post/113281</guid><dc:creator><![CDATA[Franzk]]></dc:creator><pubDate>Fri, 14 Oct 2011 10:59:13 GMT</pubDate></item></channel></rss>