[Qt-interest] About QScopedPointer

Sean Harmer sean.harmer at maps-technology.com
Fri May 13 10:41:29 CEST 2011


On Friday 13 May 2011 00:47:56 Mihail Naydenov wrote:
> I am in a bit of a struggle how to pass a pointer to a
> QScopedPointer-managed pointer.
> It seems impossible:
> 
> QScopedPointer<Data> d;
> 
> fund(void** data);  //< want to pass d into this
> 
> I guess QScopedPointer lacks a T*& data() member function. Is this going to
> be addressed. Or am I missing something.

I think QSharedPointer will work in this case. QScopedPointer is not meant to 
be passed around.

Cheers,

Sean




More information about the Qt-interest-old mailing list