[Development] The future of smart pointers in Qt API

Eric Lemanisser eric.lemanissier at gmail.com
Fri Jan 31 16:13:45 CET 2020

Are we really considering abandoning the parent-child ownership for
qt6 ? that would be a huge breaking change

> > I would like to separate pointers with simple ownership and complicated > ownership. We could solve passing of raw pointers with simple ownership > first using standard smart pointers. Where as the more complicated pointers > would require special classes like those Daniel Teske has been working on. I'm not sure how to properly identify what is the "complicated ownership". I don't think that there are places in Qt API where we really need something more complicated than regular shared/weak/unique pointers. Even intrusive pointers are not required I guess. When you think about something more complicated, this is probably an architectural problem (like with parent-child) or bad API design. Can you provide some real examples where we need something more complicated than regular smart pointers, please?

More information about the Development mailing list