Results 1 to 8 of 8

Thread: Deleting objects in their event handler

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Aug 2007
    Posts
    166
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    16
    Thanked 14 Times in 14 Posts

    Default Re: Deleting objects in their event handler

    With deleteLater() you can delete the object from it's own methods or events without problem, because it shedule the object pointer for a deleteion after the object returns to the main event loop.

  2. The following user says thank you to The Storm for this useful post:

    drhex (18th March 2009)

Similar Threads

  1. Question about mouse,keyboard event handler?
    By Sheng in forum Qt Programming
    Replies: 2
    Last Post: 24th February 2009, 07:50
  2. Replies: 4
    Last Post: 19th February 2009, 11:10
  3. Is it bad to delete an object during its event handler?
    By codeslicer in forum Qt Programming
    Replies: 3
    Last Post: 30th December 2008, 16:14
  4. Changing default event handler name
    By mabeeh in forum Newbie
    Replies: 1
    Last Post: 21st April 2008, 15:18
  5. event handler
    By mattia in forum Newbie
    Replies: 10
    Last Post: 8th November 2007, 12:54

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
  •  
Qt is a trademark of The Qt Company.