Example:
I have three pushbuttons, all makes almost the same. I want to have only 1 slot-function for all 3 buttons.
def slotButtons(nr_button):
#common part
if(nr==1):
#for button 1
else if(nr==2):
#for button 2
else if(nr==3):
#for button 3
#common part
So I need something like slots with parameter..
QtCore.QObject.connect(pushButton1, QtCore.SIGNAL("clicked()"), slotButtons(1))
QtCore.QObject.connect(pushButton2, QtCore.SIGNAL("clicked()"), slotButtons(2))
QtCore.QObject.connect(pushButton3, QtCore.SIGNAL("clicked()"), slotButtons(3))
Can Python(pyQt) do something that?