[PyQt] QtGui.QApplication() never returns

Joe Turpin joe.turpin at gmail.com
Wed Dec 23 14:52:59 GMT 2009

On Mon, Dec 14, 2009 at 10:14 AM, Joe Turpin <joe.turpin at gmail.com> wrote:
> On Mon, Dec 14, 2009 at 9:15 AM, David Boddie <dboddie at trolltech.com> wrote:
>> On Sat Dec 12 21:47:16 GMT 2009, Joe Turpin wrote:
>>> I have a very basic python script file that looks like the following
>>> (taken directly from an online tutorial):
>>>     #!/usr/bin/python
>>>     # simple.py
>>>     import sys
>>>     from PyQt4 import QtGui
>>>     app = QtGui.QApplication(sys.argv)
>>>     widget = QtGui.QWidget()
>>>     widget.resize(250, 150)
>>>     widget.setWindowTitle('simple')
>>>     widget.show()
>>>     sys.exit(app.exec_())
>>> The script runs to completion when I execute it under my regular user
>>> account, but hangs when I execute it as root.. Using pdb I inserted a
>>> set_trace() and found that it never returns from the call to
>>> QtGui.QApplication(). Any ideas why this might be happening?


I've been busy with other things, as I'm sure you all are, and haven't
had time to investigate the deadlock occurring for me when I run my
simple PyQt4 app as root.

David, did my last email to the list with gdb and strace output give
any clues to where the problem lies? It looks like a deadlock, but is
this a result of system configuration or a software bug? I'm assuming
you are able to run this as root, right?

Thanks again for the help,

More information about the PyQt mailing list