[Development] unique_ptr and Qt, Take 2

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Sat May 4 00:36:29 CEST 2019


Il 04/05/19 00:33, Иван Комиссаров ha scritto:
> Back to the topic - in case we really want to support the "stack case", I’d say shared_ptr is the only option (in combination with enable_shared_from_this which is already a kinda part of QObject, as mentioned above)

QObject ownership isn't shared, it's unique. A widget is in ONE 
hierarchy, which fixes its owning native window, its coordinate system, 
its Z order amongst its siblings; not N hierarchies.

-- 
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4329 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/development/attachments/20190504/5b06bc04/attachment.bin>


More information about the Development mailing list