Results 1 to 3 of 3

Thread: QApplication::quit(); or QApplication::instance()->quit(); takes long time

  1. #1
    Join Date
    Jul 2011
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Question QApplication::quit(); or QApplication::instance()->quit(); takes long time

    hello there,
    im new to the community and i hope that i will have the time and space to be active in this forum.
    so lets dive into the point , well i have a problem that when i quit my application ( i have re-implemented QMainWindow::closeEvent() to do some work then exit the application using QApplication::quit(); or QApplication::instance()->quit();
    but it takes very long time when it enters to QApplication::quit();
    i dont know what i am making wrong .

    p.s. the application is big and has many dialogs and stuff so could it be possibley that the dumping of the dialogs or any other qt stuff.

    is there a way to get rid of this, to make the application exit faster??


    thanks,
    Sameer Ababneh

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: QApplication::quit(); or QApplication::instance()->quit(); takes long time

    Quote Originally Posted by max2u View Post
    i quit my application ( i have re-implemented QMainWindow::closeEvent() to do some work then exit the application using QApplication::quit(); or QApplication::instance()->quit();

    the application is big and has many dialogs and stuff so could it be possibley that the dumping of the dialogs or any other qt stuff.

    is there a way to get rid of this, to make the application exit faster??
    The magic 8-ball says:
    Debug your program.

  3. #3
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QApplication::quit(); or QApplication::instance()->quit(); takes long time

    if your are re-implementing close event then just do a closeEvent->accept(); after you have done saving your stuff, no need to call qApp->quit();

Similar Threads

  1. QTextEdit loading takes long time
    By sreedhar in forum Qt Programming
    Replies: 12
    Last Post: 21st March 2011, 11:29
  2. Problem: the Application Takes very long time to build
    By Ma7moud El-Naggar in forum Qt Programming
    Replies: 5
    Last Post: 20th November 2010, 07:26
  3. QImage::scaled takes long time
    By nrabara in forum Qt Programming
    Replies: 0
    Last Post: 15th December 2009, 13:19
  4. Getting QApplication instance from the executable
    By nikhilqt in forum Qt Programming
    Replies: 3
    Last Post: 7th July 2009, 11:16
  5. QApplication instance
    By nile.one in forum Qt Programming
    Replies: 9
    Last Post: 5th October 2007, 13:06

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.