Results 1 to 14 of 14

Thread: will Qt delete all dynamic data?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #7
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: will Qt delete all dynamic data?

    in main create the widget on the stack, then it will be deleted when you leave the scope. Since Qt uses pimpl the main part of the object is allocated dynamically. but if you want to create your main window on the heap use:
    Qt Code:
    1. int returnValue = app.exec();
    2. delete widget;
    3. return returnValue;
    To copy to clipboard, switch view to plain text mode 

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

    somename (31st May 2010)

Similar Threads

  1. delete first row of data from .csv file?
    By babymonsta in forum Qt Programming
    Replies: 3
    Last Post: 20th May 2010, 03:39
  2. Replies: 4
    Last Post: 16th January 2010, 10:08
  3. Replies: 4
    Last Post: 4th September 2009, 08:33
  4. Replies: 4
    Last Post: 19th February 2009, 11:10
  5. Dynamic Data Display with OpenGL
    By showhand in forum Qt Programming
    Replies: 3
    Last Post: 14th March 2006, 01:17

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.