[PyKDE] Problem with Destroy ???
Boudewijn Rempt
boud at valdyas.org
Sat Apr 27 15:21:01 BST 2002
On Thursday 25 April 2002 23:31, you wrote:
> Hello again...
> I don't know if this will help but if I add the destroy signal to the form,
> I get a core dump every time the form closes...
>
Well, I can run the pyuic generated Form1 class without any problems (using
RC2). Even running the following doesn't present me with any problems, except
for the message
Mutex destroy failure: Device or resource busy
When the second exec_loop finishes. I can imagine things going wrong; I don't
think QApplication is intended to be instantiated more than once from the
same application. If you want to run the dialog more than once from the same
app, you shouldn't quit the app when the dialog is the only window and it
closes. I can easily imagine that QApplication keeps a lot of state, even if
the object seems to go out of scope: don't forget the global reference qApp:
boud at calcifer:~> python form.py
<qt.QApplication instance at 0x8166e24>
first
first
<qt.QApplication instance at 0x8166e24>
second
Mutex destroy failure: Device or resource busy
second
In short: don't try to instantiate QApplication twice. Use one QApplication
that opens a dialog more than once.
Attached is my version of your script:
--
Boudewijn Rempt | http://www.valdyas.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: form.py
Type: text/x-python
Size: 910 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20020427/c64b9e98/form.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: form1.py
Type: text/x-python
Size: 1352 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20020427/c64b9e98/form1.py
More information about the PyQt
mailing list