<?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[Q_ARG return type in Qt 6.5]]></title><description><![CDATA[<p dir="auto">According to the documentation <a href="https://doc.qt.io/qt-6/qmetaobject.html#Q_ARG" target="_blank" rel="noopener noreferrer nofollow ugc">here</a>, Q_ARG should return a QGenericArgument; however, in my testing it is returning a QMetaMethodArgument.</p>
<p dir="auto">The following simple line which worked in Qt 5.15:</p>
<pre><code>QGenericArgument arg = Q_ARG(int,1);
</code></pre>
<p dir="auto">has an error in Qt 6.5, "No viable conversion from 'QMetaMethodArgument' to 'QGenericArgument'. What am I doing wrong, or is this a mistake in the docs?</p>
]]></description><link>https://forum.qt.io/topic/144875/q_arg-return-type-in-qt-6-5</link><generator>RSS for Node</generator><lastBuildDate>Wed, 08 Apr 2026 13:46:33 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/144875.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 04 May 2023 13:44:18 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Q_ARG return type in Qt 6.5 on Mon, 18 Sep 2023 06:25:04 GMT]]></title><description><![CDATA[<p dir="auto">I reviewed the old code and added the following definition:</p>
<pre><code>#define Q_ARG_OLD(type, data) QArgument&lt;type &gt;(#type, data)
</code></pre>
]]></description><link>https://forum.qt.io/post/773024</link><guid isPermaLink="true">https://forum.qt.io/post/773024</guid><dc:creator><![CDATA[mrcoffee]]></dc:creator><pubDate>Mon, 18 Sep 2023 06:25:04 GMT</pubDate></item><item><title><![CDATA[Reply to Q_ARG return type in Qt 6.5 on Fri, 05 May 2023 07:57:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/flatland3r">@<bdi>flatland3r</bdi></a><br />
In any case, since the returned class is part of private API and not supposed to be used directly, I would suggest</p>
<pre><code>auto arg = Q_ARG(int,1);
</code></pre>
]]></description><link>https://forum.qt.io/post/757154</link><guid isPermaLink="true">https://forum.qt.io/post/757154</guid><dc:creator><![CDATA[Asperamanca]]></dc:creator><pubDate>Fri, 05 May 2023 07:57:54 GMT</pubDate></item><item><title><![CDATA[Reply to Q_ARG return type in Qt 6.5 on Thu, 04 May 2023 15:42:01 GMT]]></title><description><![CDATA[<p dir="auto">This seems to be an oversight in the documentation - I would suggess creating a <a href="bugreports.qt.io/">bug report</a> so the documentation gets fixed.</p>
]]></description><link>https://forum.qt.io/post/757065</link><guid isPermaLink="true">https://forum.qt.io/post/757065</guid><dc:creator><![CDATA[Christian Ehrlicher]]></dc:creator><pubDate>Thu, 04 May 2023 15:42:01 GMT</pubDate></item></channel></rss>