[PyQt] signal twice emit

Nick Gaens mail at nickgaens.com
Tue Jun 29 14:38:50 BST 2010


Try this way of connecting:

self.btn_save.clicked.connect(self.p)


On Tue, Jun 29, 2010 at 3:06 PM, Csaba Toth <csaba.toth at i3rendszerhaz.hu>wrote:

> Hi,
>
> i have a problem with recent PyQt versions, sometimes a signal (what i
> saw was with button click signal) emitted twice.
>
> for example i use this:
>
> def p(self, clicked=False):
>    print('emitted')
> self.connect(self.btn_save, QtCore.SIGNAL("clicked(bool)"), self.p)
>
> and if i press the button it wrotes twice the 'emitted' to console.
> What i make wrong?
>
> thanks in advance,
> Csaba
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>



-- 
Nick Gaens
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100629/94b2bbd3/attachment.html>


More information about the PyQt mailing list