I'm just learning PyQt and looking at the Signals and Slots mechanism. I'm a bit baffled by the verbose syntax. Why do we have:
self.connect(dial, SIGNAL("valueChanged(int)"), spinbox.setValue)
I would much prefer to write the following:
self.connect(dial.valueChanged, spinbox.setValue)
Can anyone tell me why the connect() syntax needs to be so explicit/verbose?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…