From the Qt documentation
I believe the issue is the compiler will implicitly define a default constructor in places where your type is still incomplete causing the error.Classes that are forward declared can be used within QScopedPointer, as long as the destructor of the forward declared class is available whenever a QScopedPointer needs to clean up.
Concretely, this means that all classes containing a QScopedPointer that points to a forward declared class must have non-inline constructors, destructors and assignment operators
Bookmarks