[PyKDE] PyQt not refing slot methods - bug?
Boudewijn Rempt
boud at valdyas.org
Fri Aug 30 07:20:00 BST 2002
On Thursday 29 August 2002 21:02, Burley, Brent wrote:
>
> Is it a bug that PyQt isn't refing slot methods? Doesn't anyone use
> lambdas for slots?
>
I don't think it's a bug -- it's certainly behaviour I would expect of
PyQt, and no, I never use lambda's for slots. I feel a bit silly right now,
because I can't think why using lambda is better than:
import sys
from qt import *
def hello(): print 'hello'
app = QApplication(sys.argv)
b = QPushButton('hello', None)
QObject.connect(b, SIGNAL('clicked()'), hello)
app.setMainWidget(b)
b.show()
app.exec_loop()
--
Boudewijn Rempt | http://www.valdyas.org
More information about the PyQt
mailing list