Results 1 to 7 of 7

Thread: How to close all windows that were created in main()?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2006
    Posts
    18
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to close all windows that were created in main()?

    EDIT: Btw, make sure you allocate widgets on stack if you set Qt::WA_DeleteOnClose attribute! Otherwise you'll get a crash due to double delete...
    On the stack? I thought this allocates an object on the heap:
    Qt Code:
    1. Object *example = new Object;
    To copy to clipboard, switch view to plain text mode 

    Anyways it works like you suggested, thank you!

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: How to close all windows that were created in main()?

    Quote Originally Posted by Mister_Crac View Post
    On the stack? I thought this allocates an object on the heap:
    Argh, sorry. I was in a hurry when answering. I meant heap while I still wrote stack..
    J-P Nurmi

Similar Threads

  1. windows code troubling Qt
    By munna in forum Qt Programming
    Replies: 9
    Last Post: 9th November 2006, 19:52
  2. converting unix exe to windows binary
    By deekayt in forum General Programming
    Replies: 2
    Last Post: 17th September 2006, 01:00
  3. Replies: 5
    Last Post: 4th August 2006, 23:44
  4. Replies: 4
    Last Post: 12th January 2006, 04:16
  5. Qt and windows vista
    By munna in forum General Discussion
    Replies: 8
    Last Post: 11th January 2006, 22:33

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.