Results 1 to 4 of 4

Thread: Correctly deleting a qwidget with no parent

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Jul 2009
    Location
    Enschede, Netherlands
    Posts
    462
    Thanked 69 Times in 67 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Correctly deleting a qwidget with no parent

    Use QObject::deleteLater(), which is practically the same as setting WA_DeleteOnClose, with the difference that the creating class tells the object to delete itself when done, instead of telling it to delete itself in a while.
    Horse sense is the thing that keeps horses from betting on people. --W.C. Fields

    Ask Smart Questions

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

    boblatino (2nd August 2010)

Similar Threads

  1. Promoting the parent QWidget of a QWidget form
    By extrakun in forum Qt Tools
    Replies: 6
    Last Post: 16th April 2010, 14:19
  2. Deleting a QWidget derived object manually
    By hubbobubbo in forum Qt Programming
    Replies: 2
    Last Post: 4th February 2010, 16:32
  3. Replies: 7
    Last Post: 23rd January 2010, 22:59
  4. QWidget *parent = 0 question
    By radek.z in forum Qt Programming
    Replies: 3
    Last Post: 18th May 2009, 09:32
  5. Replies: 1
    Last Post: 28th July 2006, 14:10

Tags for this Thread

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.