title: What is the difference between QPointer, QSharedPointer and QWeakPointer classes in Qt?
body: <p>I have read from the Qt documentations about <code>QPointer</code>, <code>QSharedPointer</code> and <code>QWeakPointer</code> classes. It says: </p>
  
  <ol>
  <li><p><code>QPointer</code> 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.</p></li>
  <li><p><code>QSharedPointer</code> class holds a strong reference to a shared pointer.</p></li>
  <li><p><code>QWeakPointer</code> class holds a weak reference to a shared pointer.</p></li>
  </ol>
  
  <p>My questions is "What is the difference between these classes?". i.e what is the difference between a pointer to an object and a reference to a pointer? Are they all pointers to objects with different mechanisms and behaviors?</p>