[Interest] What's the recommended way to put QObjects in smart pointers?

Nikos Chantziaras realnc at gmail.com
Thu May 5 17:35:33 CEST 2016


On 05/05/16 14:52, Giuseppe D'Angelo wrote:
> On Thu, May 5, 2016 at 1:22 PM, Nikos Chantziaras <realnc at gmail.com> wrote:
>> That doesn't do anything useful. I think you're missing the point here.
>
> Did you try the earlier suggestion of using a QScopedPointer with a
> custom deleter that holds a QPointer to the instance and deletes it
> only if it has not been deleted already?

Yes. But I now did the same with unique_ptr, so all is fine now :-)




More information about the Interest mailing list