What is the best way to use QExplicitlySharedDataPointer and inherited classes. I would like when the BaseClass exits on it's own to have a my d pointer be QExplicitlySharedDataPointer <BaseClassPrivate> and when I have a Derived class on top of this base class I'd like to have d be a QExplicitlySharedDataPointer <DerivedClassPrivate>.

I tried making DerivedClassPrivate inherit from BaseClassPrivate, and then make the d pointer protected and re-define the d-pointer in my derived class, but it seems now that I have two copies of the d-pointer both local to the class they are defined in... which is not what I want.