I have a bunch of buttons in a QButtonGroup that I am trying to connect with a function.
Here is my code:
def __init__(self):
addAppButtonGroup.addButton(addCustomAppButton)
addAppButtonGroup.addButton(addAppleStoreAppButton)
addAppButtonGroup.addButton(addWebLinkButton)
addAppButtonGroup.setId(addCustomAppButton, 0)
addAppButtonGroup.setId(addAppleStoreAppButton, 1)
addAppButtonGroup.setId(addWebLinkButton, 2)
""Stuff to make buttons show up"""
self.connect(addAppButtonGroup, SIGNAL("buttonClicked(int)"), self.AddApplication)
def AddApplication(self, id):
print "hi"
print id
def __init__(self):
addAppButtonGroup = QButtonGroup()
addAppButtonGroup.addButton(addCustomAppButton)
addAppButtonGroup.addButton(addAppleStoreAppButton)
addAppButtonGroup.addButton(addWebLinkButton)
addAppButtonGroup.setId(addCustomAppButton, 0)
addAppButtonGroup.setId(addAppleStoreAppButton, 1)
addAppButtonGroup.setId(addWebLinkButton, 2)
""Stuff to make buttons show up"""
self.connect(addAppButtonGroup, SIGNAL("buttonClicked(int)"), self.AddApplication)
def AddApplication(self, id):
print "hi"
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.
Bookmarks