What is the difference between QPointer, QSharedPointer and QWeakPointer classes in Qt?
问题 I have read from the Qt documentations about QPointer , QSharedPointer and QWeakPointer classes. It says: QPointer is a template class that provides guarded pointers to Qt objects and behaves like a normal C++ pointer except that it is automatically set to 0 when the referenced object is destroyed and no "dangling pointers" are produced. QSharedPointer class holds a strong reference to a shared pointer. QWeakPointer class holds a weak reference to a shared pointer. My questions is "What is