QSharedPointer
basically wraps your pointer. So you can't access directly with the '.' operator, this is the reason why you get this error : getTitle
is not part of the class QSharedPointer
.
However you have multiple ways to retrieve the actual pointer :
data
: not the simplest way but it's explicit, and it sometimes mattersoperator->
: so you can use yourQSharedPointer
like an actual pointerm_noteList[i]->getTitle();
operator*
: to do something like(*m_noteList[i]).getTitle();