[PyQt] signal twice emit
Csaba Toth
csaba.toth at i3rendszerhaz.hu
Tue Jun 29 18:42:37 BST 2010
Thanks for the advices, but this happens just with the most recent
versions of PyQt, i think it started to appear after i upgradeed to 4.7.
I used all versions from the 4.7 era, don't remember if it happened at
the early versions, but with the most recent version it does.
I use PyQt and QT for 4 year long from now, never seen any defect like
this. This program was developed 3 year ago, i don't think the solution
will be to change the connection methods, or to modify anything in the
code of the program. This is like plug into our heads in the sand
instead of to figure out what is the problem with PyQt.
Some day ago i compiled Qt 4.6.3 and SIP/PyQt-latest, but not with
MinGW, but with VC2008. Result was the same, so I think the problem will
be with PyQt/SIP/QT somewhere.
Tried to make a sample app, but no luck, sometimes it happens sometimes
not. For example here 20 computer runs this program, about the 20% of
the clients told me to have this happened per day, and 1 to 3 times per
day, it's full random. But sometimes a simple test app what i wrote do
it constantly.
regards,
Csaba
2010.06.29. 15:38 keltezéssel, Nick Gaens írta:
> 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
> <mailto: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
> <mailto:PyQt at riverbankcomputing.com>
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
>
>
>
> --
> Nick Gaens
>
>
>
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
More information about the PyQt
mailing list