PDA

View Full Version : QT deleteLater again.



bunjee
10th May 2008, 22:01
Hey there,

I'm using some components that needs to be "deleted later".
I need some clarification about the way this works.

How is defined the order deleteLater items are deleted ?

What happens if I deleteLater a widget and deleteLater some more objects inside ?

Will objects be deleted due to their parency in the postponed father widget's deletion ?
Or
Will they be deleteLater after the deletion of the father widget?

Thanks.

wysota
10th May 2008, 22:36
It will be safe, don't think about it. The order is undetermined, as far as I remember. Events are only delivered to existing objects. Probably if an object is deleted, all its pending events are removed from the queue.