[PyQt] QCoreApplication doesn't exit

Phil Thompson phil at riverbankcomputing.com
Tue Mar 24 23:34:53 GMT 2009

On Wed, 25 Mar 2009 00:10:31 +0100, Thomas Coopman
<thomas.coopman at gmail.com> wrote:
> I have a problem with QCoreApplication,  my program doesn't return.
> this is the the code
> import sys
> from PyQt4.QtCore import QCoreApplication
> if __name__=="__main__":
>     app=QCoreApplication(sys.argv)
>     sys.exit(app.exec_())
> but this program doesn't exit and blocks all input in konsole, it just
> doesn't do anything and doesn't respond to keypresses.
> Am I doing something wrong?

It's doing exactly what you have told it to do - sitting in the event loop
waiting for events to process.


More information about the PyQt mailing list