[PyQt] Double signal emission with connectSlotsByName

Andreas Pakulat apaku at gmx.de
Mon Apr 13 08:56:28 BST 2009


On 12.04.09 12:58:09, Lauro Moura wrote:
> I was trying to use connectSlotsByName but I'm getting double
> emissions for the QPushButton::clicked() signal. Is there any thing
> missing in the code?

Thats because the signal actually has a parameter, if you connect it to
a slot without any parameter then you get two connections, one with and
one without the parameter. Thats a limitation in PyQt4 AFAIK and can be
fixed by annotating (sorry can't remember the python term) the slot to
identify the overload of the signal you want to receive. See the PyQt4
documentation for the details.

Andreas

-- 
Green light in A.M. for new projects.  Red light in P.M. for traffic tickets.


More information about the PyQt mailing list