Results 1 to 14 of 14

Thread: will Qt delete all dynamic data?

Hybrid View

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

    Default Re: will Qt delete all dynamic data?

    where do you want to show it?
    Inside your main window: use layouts.
    outside your main widnow: use QDialog as a base class for example. or set the modal widget attribute.

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

    somename (31st May 2010)

  3. #2
    Join Date
    May 2010
    Posts
    39
    Qt products
    Qt3 Qt4
    Thanks
    11
    Thanked 1 Time in 1 Post

    Default Re: will Qt delete all dynamic data?

    aa.. QDialog..
    Ok, thanks!

  4. #3
    Join Date
    May 2010
    Posts
    39
    Qt products
    Qt3 Qt4
    Thanks
    11
    Thanked 1 Time in 1 Post

    Default Re: will Qt delete all dynamic data?

    hmm.. I have one problem.
    My app has one QMainWindow, and several other QWidget that can be show on QMainWindow(one at the time, and it is not QTabWidget!!).

    There are several situations:

    qt Code:
    1. class Widget : public QWidget
    2. {
    3. Widget(QWidget *parent) : QWidget(parent) {};
    4. }
    5. //In this situation, on my QMainWindow are showing several widget at the time
    6.  
    7.  
    8. class Widget : public QDialog
    9. {
    10. Widget(QWidget *parent) : QDialog(parent) {};
    11. }
    12. //In this situation, widget show as a dialog, on other window (not in QMainWindow)
    13.  
    14. class Widget : public QWidget
    15. {
    16. Widget() {};
    17. }
    18. //In this situation all works fine, only this widget are showing on QMainWindow at the time. But it brings memory leaks,
    19. // because this widget has no parent, and i need to delete it by it self..
    20.  
    21. //In my QMainWindow I do this:
    22. setCurrentWidget(widget)
    To copy to clipboard, switch view to plain text mode 
    Last edited by somename; 31st May 2010 at 20:03.

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

    Default Re: will Qt delete all dynamic data?

    Have a look at QStackedWidget!

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

    somename (1st June 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, 04:39
  2. Replies: 4
    Last Post: 16th January 2010, 11:08
  3. Replies: 4
    Last Post: 4th September 2009, 09:33
  4. Replies: 4
    Last Post: 19th February 2009, 12:10
  5. Dynamic Data Display with OpenGL
    By showhand in forum Qt Programming
    Replies: 3
    Last Post: 14th March 2006, 02: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.