Ярлыки

суббота, 3 ноября 2012 г.

PyQt4: connect


Task: run function mySlotFunction on changing value in combobox:

There is bad idea:
self.connect(self.myComboBox, QtCore.SIGNAL("currentIndexChanged(-1)"), self.
mySlotFunction)  

There is good idea:
self.connect(self.myComboBox, QtCore.SIGNAL("currentIndexChanged(int)"), self.mySlotFunction)   

Комментариев нет:

Отправить комментарий