[Qt-interest] remove QgRaphicsItem from parent

Rainer Wiesenfarth Rainer.Wiesenfarth at inpho.de
Thu Oct 8 18:46:34 CEST 2009


From: Riccardo Roasio [mailto:riccardo.roasio at gmail.com] 
> I know....
> 
> after doing a ~GGraphicsItem
> 
> i do a elemenents.clear so the problem is not present..
> [...]

As I said, you should _almost_never_ call a destructor like you do with
"e->~QGraphicsItem();" (unless you know exactly what you are doing). Believe
me, you want to use "delete e;" instead.

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

-- 
INPHO GmbH * Smaragdweg 1 * 70174 Stuttgart * Germany
phone: +49 711 2288 10 * fax: +49 711 2288 111 * web: www.inpho.de
place of business: Stuttgart * managing director: Johannes Saile
commercial register: Stuttgart, HRB 9586
Leader in Photogrammetry and Digital Surface Modelling
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3438 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091008/9237cd93/attachment.bin 


More information about the Qt-interest-old mailing list