[Interest] QApplication doesn't want to quit

Thiago Macieira thiago.macieira at intel.com
Wed Sep 2 16:51:43 CEST 2015

On Wednesday 02 September 2015 12:40:19 Igor Mironchik wrote:
> Hi,
> Standard solution:
> QApplicationapp(argc,argv);
> QObject::connect(&app,&QApplication::lastWindowClosed,
> &app,&QApplication::quit); I'm sure that lastWindowClosed emits, but
> QApplication doesn't want to quit. For testing I build application with
> CONFIG += console And I see this console window... What can be the
> problem? One more: I'm sure that aboutToQuit() signal emits too.

My guess is that you have something calling processEvents() and not obeying 
the event loop interruption request.

What's the backtrace of the application in that state? After the 
lastWindowClosed() signal was emitted, pause the application in the debugger, 
get the backtrace, and look at what it is doing instead of exiting.
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

More information about the Interest mailing list