Get The Object Pointer Is Pointing To
<p>I have a QList which I have inserted pointers of objects into. I am trying to iterate through this QList to read the name of these objects. Whenever I do so, I am getting the address of these objects as oppose to reading the object name itself. I am wondering how would I be able to read the object name instead of the address?</p>

<pre><code>QList&lt;MyObject*&gt; newObjectList;
QList&lt;MyObject*&gt;::iterator i;

MyObject *pNewObject = new MyObject(name);
MyObject.append(pNewObject); 

for (i = newObjectList.begin(); i != newObjectList.end(); i++) {
    cout &lt;&lt; "\n" &lt;&lt; *i &lt;&lt; "\n";
}
</code></pre>
