Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Jul 2005

    Qt app exit on h/w

    My S60/Qt app working properly but it is not exiting (always running in background) to stop this I need to reboot my h/w.
    I tried flowing API to exit app
    QApplication::quit (), QApplication::close ()

    But both are not working.

    If any body has any clues regarding this please share with me.


  2. #2
    Registered User
    Join Date
    Dec 2006

    Re: Qt app exit on h/w


    Does the application have a UI? Have you tried simply pressing the red (hang-up call) button. Works every time for me!

    What are you using to trigger the quit() and close() functions? Are you certain they are actually called?

    Of course it's possible that your application hangs for some reason during exit - to help debug that we'd need more information.


  3. #3
    Registered User
    Join Date
    Mar 2003

    Re: Qt app exit on h/w

    Sorry to get back to this old thread but I didn't find the solution anywhere. I've exactly same problem with Qt 4.6.3 + Mobility 1.0.2 on all S60 devices.

    Main funtion ends and I cannot see anything on app list but somehow the app stays alive. Data connection is still on and installer asks if want to close the app if try to install again.

  4. #4
    Super Contributor
    Join Date
    Nov 2009
    Minnesota, USA

    Re: Qt app exit on h/w

    Most likely the main window was closed but the application never ended. Simply closing the last window does not end the application -- it will continue merrily spinning/waiting in the event loop. Having a return follow the exec() is necessary but not sufficient -- you also have to execute the quit() slot (eg, as a result of pushing a button on your main screen).

    And it's not that hard to fall into the trap of having exec() twice in your application, once in main.cpp and once in your main widget class. If you do that then the quit() will exit the first exec() but then you fall right into the second.

    In any event, the red button should kill the app, unless it's caught in a tight run loop. (If that is the case you may not even be able to turn the phone off -- you may have to remove the battery.)

  5. #5
    Registered User
    Join Date
    Apr 2010

    Re: Qt app exit on h/w

    use QCoreApplication::quit(), I have used this in my program and it exits correctly and releases all the resources.

    Else leave the default exit option on the rightselection soft key.

  6. #6
    Registered User
    Join Date
    Sep 2009

    Re: Qt app exit on h/w


Similar Threads

  1. Question about launch App
    By zhangwei_Nirvana in forum Symbian
    Replies: 1
    Last Post: 2007-12-13, 08:28
  2. Problem with py standalone app
    By darrarski in forum Symbian
    Replies: 0
    Last Post: 2007-11-23, 14:11
  3. App Exit without Capability
    By Rozik in forum Symbian
    Replies: 2
    Last Post: 2007-04-27, 13:10
  4. Native app: press exit twice
    By bercobeute in forum Symbian
    Replies: 4
    Last Post: 2006-02-26, 17:02
  5. UNDESIRED Exit command key.
    By tektronic in forum Mobile Java General
    Replies: 4
    Last Post: 2005-05-13, 18:27

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts