I have an object database (objects inherit QObject) which is queryable. The result of the query is a list of zero or more objects. I don't want to give pointers themselves, as people could call delete on them and destroy the database.
In this example: QList<QObject*> results = objDb.query(); I want results to be weak pointers. such that delete results.at(0) will not actually delete an object, just the pointer in the list. When creating my object database, do I store real pointers or QSharedPointers? In the list am I returning QSharedPointers or QWeakPointers? Is there a better pointer class that I should be using? Thanks.
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest