[PyQt] signal issue with qbuttongroup
Di Zou
di_zou at yahoo.com
Thu Aug 4 16:24:22 BST 2011
I have a bunch of buttons in a button group.
Here is my code:
def Function():
addAppButtonGroup = QButtonGroup()
addAppButtonGroup.addButton(addCustomAppButton)
addAppButtonGroup.addButton(addAppleStoreAppButton)
addAppButtonGroup.addButton(addWebLinkButton)
addAppButtonGroup.setId(addCustomAppButton, 0)
addAppButtonGroup.setId(addAppleStoreAppButton, 1)
addAppButtonGroup.setId(addWebLinkButton, 2)
self.connect(addAppButtonGroup, SIGNAL("buttonClicked(int)"), self.AddApplication)
"""
Code that makes the buttons show up on screen
"""
def AddApplication(id):
print "hi"
print id
The buttons show up. However when I click a button, nothing is printed on screen. How do I get the buttons connected to the AddApplication function?
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20110804/ce1be819/attachment.html>
More information about the PyQt
mailing list