Results 1 to 2 of 2

Thread: New window closes automatically

  1. #1
    Join Date
    Aug 2010
    Posts
    28
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default New window closes automatically

    I have been searching the documentation but cannot find anything but am unsure what I should be searching for.

    When I open a new window created by "Add New" - "Qt" - "Qt Designer Form Class", I want to attatch that window to a toolbar option.

    When I attempt to show this, upon clicking the appropriate toolbar option a window appears and instantly closes.

    Can someone please let me know what it is that I should be looking for?

    I don't need code solutions but rather pointed toward an appropriate section of documentation.


    Thank you

  2. #2
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: New window closes automatically

    Allocate memory for the new window on the heap, using pointer and new (don't forget to pass a pointer to your main window as a parent for the new window)

Similar Threads

  1. Last dialog closes app
    By been_1990 in forum Qt Programming
    Replies: 2
    Last Post: 12th April 2010, 15:17
  2. QComboBox drop-down closes automatically
    By kapoorsudhish in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 26th February 2010, 06:34
  3. execute sth before program exits (user closes window)
    By donglebob in forum Qt Programming
    Replies: 6
    Last Post: 9th December 2008, 23:24
  4. QMdiSubWindow closes main window
    By frido in forum Qt Programming
    Replies: 1
    Last Post: 25th July 2008, 10:54
  5. QTextBrowser - click on link - closes window
    By bruccutler in forum Newbie
    Replies: 2
    Last Post: 19th June 2007, 20:39

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.