<?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[Pass different classes to QSharedPointer?]]></title><description><![CDATA[<p dir="auto">Howdy y'all, been reading the QT docs for the past hour and don't see if this is possible. I have 2 classes named Object1 and Object2, is it possible to pass each class to just 1 method with a QSharedPointer parameter?</p>
<p dir="auto">What I'm coding:</p>
<pre><code>void getData(QSharedPointer&lt;???&gt; object)  &lt;-- ??? is where I'm trying to pass both Object1 first and when that completes pass Object2
{
    ....
}
</code></pre>
<p dir="auto">Thanks for any help and/or tips you provide. Much appreciated.</p>
]]></description><link>https://forum.qt.io/topic/127464/pass-different-classes-to-qsharedpointer</link><generator>RSS for Node</generator><lastBuildDate>Tue, 15 Sep 2026 21:01:54 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/127464.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 10 Jun 2021 18:53:22 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Pass different classes to QSharedPointer? on Thu, 10 Jun 2021 20:28:15 GMT]]></title><description><![CDATA[<p dir="auto">Appreciate the help, thank you both. That worked</p>
]]></description><link>https://forum.qt.io/post/664441</link><guid isPermaLink="true">https://forum.qt.io/post/664441</guid><dc:creator><![CDATA[Calicoder]]></dc:creator><pubDate>Thu, 10 Jun 2021 20:28:15 GMT</pubDate></item><item><title><![CDATA[Reply to Pass different classes to QSharedPointer? on Thu, 10 Jun 2021 19:19:59 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">template &lt;class T&gt;
void getData(QSharedPointer&lt;T&gt; object)
{
    ....
}
</code></pre>
]]></description><link>https://forum.qt.io/post/664428</link><guid isPermaLink="true">https://forum.qt.io/post/664428</guid><dc:creator><![CDATA[VRonin]]></dc:creator><pubDate>Thu, 10 Jun 2021 19:19:59 GMT</pubDate></item><item><title><![CDATA[Reply to Pass different classes to QSharedPointer? on Thu, 10 Jun 2021 19:15:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> Googling for some good examples currently. Any chance you have a sample code to share? Thanks</p>
]]></description><link>https://forum.qt.io/post/664427</link><guid isPermaLink="true">https://forum.qt.io/post/664427</guid><dc:creator><![CDATA[Calicoder]]></dc:creator><pubDate>Thu, 10 Jun 2021 19:15:51 GMT</pubDate></item><item><title><![CDATA[Reply to Pass different classes to QSharedPointer? on Thu, 10 Jun 2021 19:00:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> Thanks for the reply. Never did that before, more reading I'm guessing.</p>
]]></description><link>https://forum.qt.io/post/664425</link><guid isPermaLink="true">https://forum.qt.io/post/664425</guid><dc:creator><![CDATA[Calicoder]]></dc:creator><pubDate>Thu, 10 Jun 2021 19:00:38 GMT</pubDate></item><item><title><![CDATA[Reply to Pass different classes to QSharedPointer? on Thu, 10 Jun 2021 18:58:15 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">You can make your function a templated function.</p>
]]></description><link>https://forum.qt.io/post/664424</link><guid isPermaLink="true">https://forum.qt.io/post/664424</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Thu, 10 Jun 2021 18:58:15 GMT</pubDate></item></channel></rss>