So I have a class which has an id data member and I'm using it in a QList<QSharedPointer<MyClass>>
and I'm unsure about how to go about checking to see if there's an existing id in that QList
. How would I go about doing that exactly as QList::contains
would require a QSharedPointer<MyClass>&
rather than a MyClass*
Should I just use a QHash which uses the id as the key?