[Qt-interest] remove QgRaphicsItem from parent
Riccardo Roasio
riccardo.roasio at gmail.com
Mon Oct 12 08:36:32 CEST 2009
I believe you ...
but using this code:
while (! elements.isEmpty ())
{
delete elements.takeFirst ();
}
update();
the elements still exist on the screen.....
Riccardo
2009/10/8 Rainer Wiesenfarth <Rainer.Wiesenfarth at inpho.de>:
>
> 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
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
More information about the Qt-interest-old
mailing list