If you do it that way You might need self.ui.btnName.connect.... Wait - looking at your code - are you using pyuic4 or did you write your own qt interface in the code?