title: Access to referenced elements in QList and QSharedPointer
body: <p>There is a QList member variable named <code>m_noteList</code> containing QSharedPointer elements of class <code>Note</code>.  </p>
  
  <pre><code>private: 
     QList&lt; QSharedPointer&lt;Note&gt; &gt; m_noteList; 
  </code></pre>
  
  <p>If a new note is created, its reference is appended to the list:</p>
  
  <pre><code>void Traymenu::newNote(){
      QSharedPointer&lt;Note&gt; note(new Note(this));
      m_noteList &lt;&lt; note;
  }
  </code></pre>
  
  <p>For each Note-element, whichs pointers are in m_noteList, I want to get its title and add it to my contextmenu. Purpose is to click on that title to open the note:</p>
  
  <pre><code>for ( int i = 0 ; i &lt; m_noteList.count() ; i++ ) {
      std::string menuEntryName = m_noteList[i].getTitle();
      QAction *openNote = m_mainContextMenu.addAction(menuEntryName);
  }
  </code></pre>
  
  <p>I get an error </p>
  
  <pre><code>C:\project\traymenu.cpp:43: Fehler: 'class QSharedPointer&lt;Note&gt;' has no member named 'getTitle'
       std::string menuEntryName = &amp;m_noteList[i].getTitle();
                                                  ^
  </code></pre>
  
  <p>Basically I want to get access to the objects that are referenced in the <code>m_noteList</code>. How do I do that? I thought with <code>m_noteList[i]</code> to get access to that element, but obviously the compiler expects something of type <code>QSharedPointer</code>. Why?</p>