Hi Phil:

=============================================================================
import sip
from PyQt4.Qt import *

called = []

class Core(QObject):
    def __init__(self, parent=None):
        QWidget.__init__(self, parent)
        QObject.connect(self, SIGNAL("destroyed()"), self.callback)
QObject.connect(self, SIGNAL("destroyed()"), lambda: self.callback())
    def callback(self):
        called.append("done")

app = QApplication([])
core = Core(app)
sip.delete(core)

assert len(called) == 2, called
=============================================================================
Traceback (most recent call last):
  File "bugpyqt.py", line 18, in <module>
    assert len(called) == 2, called
AssertionError: ['done']

The slot with "lambda" is called, but the other one is not.
--
Giovanni Bajo
Develer S.r.l.
http://www.develer.com
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to