Results 1 to 3 of 3

Thread: How do I distroy an object when clicking on the x?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2011
    Posts
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default How do I distroy an object when clicking on the x?

    Hi Gurus,

    I have a gui which calls another gui like so:

    Qt Code:
    1. if (userManager==0)
    2. {
    3. userManager = new UserManager();
    4.  
    5. }
    6. userManager->show();
    To copy to clipboard, switch view to plain text mode 

    This then launches the user manager window. So now how do I make sure that the ~UserManager gets executed when someone closes the window by clicking on the x?

    I know I should delete the reference to UserManager, but where do I do this?

    Thanks a million
    RT
    Last edited by wysota; 2nd April 2011 at 12:00. Reason: missing [code] tags

Similar Threads

  1. Replies: 4
    Last Post: 20th August 2010, 13:07
  2. Replies: 1
    Last Post: 30th July 2010, 23:05
  3. writing object to the file(Object Persistance)
    By jjbabu in forum Qt Programming
    Replies: 2
    Last Post: 11th June 2009, 14:28
  4. Open a QMainWindow Object in QDialog Object
    By chuengchuenghq in forum Qt Programming
    Replies: 1
    Last Post: 13th June 2008, 06:33
  5. how to distroy child window which parents is zero
    By rajesh in forum Qt Programming
    Replies: 4
    Last Post: 22nd June 2006, 08:52

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.