Results 1 to 2 of 2

Thread: Main Window

  1. #1
    Join Date
    Jul 2007
    Posts
    166
    Thanks
    25
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Main Window

    Hi,
    How can I call a destructor when I close the Main Window?

  2. #2
    Join Date
    May 2007
    Posts
    15
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Main Window

    Use the setAttribute method to set Qt::WA_DeleteOnClose to true.

    The destructor should then be automatically called when the MainWindow is closed.

  3. The following user says thank you to slcotter for this useful post:

    sabeesh (6th August 2007)

Similar Threads

  1. Replies: 15
    Last Post: 23rd March 2007, 16:16
  2. move parent window to the front.
    By hvengel in forum Qt Programming
    Replies: 4
    Last Post: 2nd February 2007, 08:41
  3. Replies: 5
    Last Post: 4th August 2006, 23:44
  4. cannot make a main window modal
    By Dark_Tower in forum Qt Programming
    Replies: 12
    Last Post: 23rd March 2006, 10:21
  5. Main window
    By Michiel in forum Qt Tools
    Replies: 1
    Last Post: 20th March 2006, 23: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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.