Results 1 to 5 of 5

Thread: delete, deleteLater, do not delete object 'unnamed' in its event handler

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    517
    Thanks
    21
    Thanked 66 Times in 62 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: delete, deleteLater, do not delete object 'unnamed' in its event handler

    i ran ur code, and it didnt emit any warning.. i m using QT 4.4.3..which version are u using

  2. #2
    Join Date
    Feb 2009
    Posts
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: delete, deleteLater, do not delete object 'unnamed' in its event handler

    Quote Originally Posted by talk2amulya View Post
    i ran ur code, and it didnt emit any warning.. i m using QT 4.4.3..which version are u using
    4.4.0.. did you press Q? that triggers a keypress event which will delete the button from the main window widget. (note the button doesn't do anything if you press it - i just used that cos it takes focus and shows how the events propogate).

  3. #3
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    517
    Thanks
    21
    Thanked 66 Times in 62 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: delete, deleteLater, do not delete object 'unnamed' in its event handler

    yes, i read your code and i pressed 'q' and the button got deleted without any warning or crash or anything..maybe they went ahead and removed the warning as u wished for, in 4.4.3 ..nice catch i guess!

Similar Threads

  1. 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

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.