PyQt Signals and multiple sources

Zabin zabin.farishta at gmail.com
Sun Dec 20 16:59:11 EST 2009


I am beginner in programming in pyqt. I have been trying to call the
same function from multiple events- but each event results in a
different instance of the function. I am just unable to figure out how
to retrieve the source which calls the function:

My source signal declarations are as below:
QtCore.QObject.connect(self.ui.Button_Process, QtCore.SIGNAL("clicked
()"), self.activate_tab)
QtCore.QObject.connect(self.ui.Button_Material, QtCore.SIGNAL("clicked
()"), self.activate_tab)
QtCore.QObject.connect(self.ui.Button_Geometry, QtCore.SIGNAL("clicked
()"), self.activate_tab)

for each of the above source i want to activate a different instance
of the activate_tab function. Any help would be greatly appreciated!



More information about the Python-list mailing list