Results 1 to 9 of 9

Thread: QDialog closing its parent on exit..

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2012
    Posts
    98
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    11

    Default Re: QDialog closing its parent on exit..

    Hm.. I attempted to replicate the problem in a few ways on a smaller project.. but it worked as normal :s. I can't really put up the entirety of the program ( a mix of environment, external dependencies, and the thing is quite large; even if just the GUI code.)

    I'll keep tinkering and report my findings.. if I figure it out before defaulting to just using member functions. I was hoping there was some (possibly obvious) oversight in my misunderstanding the event loop and static/global objects (or something along those lines.)

  2. #2
    Join Date
    Dec 2008
    Location
    Poland
    Posts
    383
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Android
    Thanks
    52
    Thanked 42 Times in 42 Posts

    Default Re: QDialog closing its parent on exit..

    Maybe Your other (main) widget is hidden?
    If Yes then closing last visible window will close app.

    Try: thang->setAttribute(Qt::WA_QuitOnClose, false);
    In the near future - corporate networks reach out to the stars. Electrons and light flow throughout the universe.
    The advance of computerization however, has not yet wiped out nations and ethnic groups.

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

    tescrin (18th December 2012)

  4. #3
    Join Date
    Sep 2011
    Posts
    1,241
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    3
    Thanked 127 Times in 126 Posts

    Default Re: QDialog closing its parent on exit..

    Quote Originally Posted by tescrin View Post
    Hm.. I attempted to replicate the problem in a few ways on a smaller project.. but it worked as normal :s. I can't really put up the entirety of the program ( a mix of environment, external dependencies, and the thing is quite large; even if just the GUI code.)

    I'll keep tinkering and report my findings.. if I figure it out before defaulting to just using member functions. I was hoping there was some (possibly obvious) oversight in my misunderstanding the event loop and static/global objects (or something along those lines.)
    This is exactly the reason for making a small compilable example. Instead of asking the forum to chase ghosts, you check the problem is actually what you try to describe with 'snippets' that obviously don't contain the problem.
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

  5. The following user says thank you to amleto for this useful post:

    tescrin (18th December 2012)

Similar Threads

  1. QDialog not closing/going out of scope?
    By Shouri in forum Newbie
    Replies: 4
    Last Post: 17th February 2012, 18:11
  2. Replies: 5
    Last Post: 21st April 2010, 21:36
  3. How to exit in a QDialog constructor
    By ms77 in forum Newbie
    Replies: 4
    Last Post: 2nd December 2009, 14:46
  4. closing a Qdialog called from a Qdialog
    By OverTheOCean in forum Qt Programming
    Replies: 3
    Last Post: 28th September 2009, 08:02
  5. Closing a QDialog
    By eu.x in forum Newbie
    Replies: 2
    Last Post: 12th March 2007, 08: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.