Results 1 to 2 of 2

Thread: QT deleteLater again.

  1. #1
    Join Date
    Jan 2007
    Location
    Paris
    Posts
    459
    Thanks
    98
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5

    Default QT deleteLater again.

    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.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT deleteLater again.

    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.

Similar Threads

  1. Qt Deletelater
    By bunjee in forum Qt Programming
    Replies: 2
    Last Post: 8th January 2008, 16:58
  2. DeleteLater works... but why?
    By TheGrimace in forum Qt Programming
    Replies: 11
    Last Post: 6th June 2007, 15:14

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.