Connecting a slot to a button in QDialogButtonBox,self.buttonBox.button(QtGui.QDialogButtonBox.Reset).clicked.connect(foo)