Results 1 to 4 of 4

Thread: how to force an exiting?

  1. #1
    Join Date
    Jul 2006
    Posts
    18
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default how to force an exiting?

    I have a main application window (QMainWindow descendant). The app creates another QMainWindow descendants with a parent pointed to the main window. The aim is to exit the application when main window is closed. Now, all opened children remain opened.

    What have I missed?

  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 force an exiting?

    Check this post.
    J-P Nurmi

  3. #3
    Join Date
    Jul 2006
    Posts
    18
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: how to force an exiting?

    Quote Originally Posted by jpn
    Check this post.
    WA-attributes are usefull, bit don't work. I have overloaded closeEvent() this way:

    QMainWindow::closeEvent(event);
    QApplication::exit();

    It works.

  4. #4
    Join Date
    Jul 2006
    Location
    Coimbatore,India
    Posts
    7
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Thumbs up Re: how to force an exiting?

    hello anli,

    i am also suffered by this problem .i got idea from your post . now, i am closing child window or any other widget , just call object->close() funtion via signals and slots. Its work prefectly.

    Thanks
    Vichu

Similar Threads

  1. force repaint
    By georgie in forum Qt Programming
    Replies: 3
    Last Post: 22nd May 2006, 13:16
  2. QThread stack overflow when exiting
    By jakamph in forum Qt Programming
    Replies: 4
    Last Post: 11th May 2006, 17:56
  3. Force redraw of QSimpleRichText when QStyleSheet changes
    By SHesselbarth in forum Qt Programming
    Replies: 1
    Last Post: 12th April 2006, 16:10
  4. QT4 beginner Fatal Error
    By Remyfr in forum Installation and Deployment
    Replies: 3
    Last Post: 11th March 2006, 01:48

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.