[PyQt] signal issue with qbuttongroup

Di Zou di_zou at yahoo.com
Thu Aug 4 22:12:54 BST 2011


That fixed it. Thanks!


----- Original Message -----
From: Mike Ramirez <gufymike at gmail.com>
To: Di Zou <di_zou at yahoo.com>
Cc: pyqt at riverbankcomputing.com
Sent: Thursday, August 4, 2011 4:42 PM
Subject: Re: [PyQt] signal issue with qbuttongroup

On Thursday, August 04, 2011 01:38:10 PM Di Zou wrote:
> My code is based on classes. This is how my code looks right now:
> 

>     def Function(self):
>         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)"),

try adding self to addAppButtonGroup, I believe it's not staying in memory 
when the singal is emitted or it can't find it.  I tend to do things this way 
and don't have a problem with it.  

Mike

-- 
All of the packets are empty.



More information about the PyQt mailing list