I have a bunch of buttons in a QButtonGroup that I am trying to connect with a function.


Here is my code:

Qt Code:
  1. def __init__(self):
  2. addAppButtonGroup = QButtonGroup()
  3. addAppButtonGroup.addButton(addCustomAppButton)
  4. addAppButtonGroup.addButton(addAppleStoreAppButton)
  5. addAppButtonGroup.addButton(addWebLinkButton)
  6.  
  7. addAppButtonGroup.setId(addCustomAppButton, 0)
  8. addAppButtonGroup.setId(addAppleStoreAppButton, 1)
  9. addAppButtonGroup.setId(addWebLinkButton, 2)
  10.  
  11. ""Stuff to make buttons show up"""
  12.  
  13. self.connect(addAppButtonGroup, SIGNAL("buttonClicked(int)"), self.AddApplication)
  14.  
  15. def AddApplication(self, id):
  16. print "hi"
  17. print id
To copy to clipboard, switch view to plain text mode 


So all the buttons show up and I can click on them. However, when I click on them, nothing is printed to the screen.


Thanks.