I have class B inheriting Class A which in turn inherits QObject.
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> bptrQt Code:
Q_OBJECT ... }; class B: public A{ Q_OBJECT ... };To copy to clipboard, switch view to plain text mode
But bptr = bClassInstancePtr gives compilation errors like cannot convert from B* to QObject* . What am I doing wrong?
Bookmarks