I have class B inheriting Class A which in turn inherits QObject.
Qt Code:
  1. class A: public QObject{
  2. Q_OBJECT
  3. ...
  4. };
  5. class B: public A{
  6. Q_OBJECT
  7. ...
  8. };
To copy to clipboard, switch view to plain text mode 
At some place I instantiate class B. At some other place I want to use Class B pointer. To avoid dangling pointer, QPointer looked very interesting. So while storing the pointer of class B, I used QPointer<B> bptr
But bptr = bClassInstancePtr gives compilation errors like cannot convert from B* to QObject* . What am I doing wrong?