[Qgis-developer] please help me write a QGIS-PostGIS GUI in Python

Martin Dobias wonder.sk at gmail.com
Tue Feb 5 16:10:55 EST 2008


On Feb 5, 2008 8:51 PM, Maciej Sieczka <tutey at o2.pl> wrote:
> PROBLEMS:
>
> 1. I don't know why actions tied to my GUI buttons are performed twice
> most of the times (always?). There is sane error handling underneath
> (within the script and PostgreSQL itself) so nothing nasty takes place,
> but it's very annoying. Ideas why and how to solve this are welcome.

I've seen this also in my programs that when using autoconnecting of
slots on_*_clicked() then the function is fired twice. Now I don't
remember what's the reason. But you can always avoid it by renaming
the function and connecting it to a signal manually:
self.connect(button, SIGNAL("clicked()"), function)

Martin



More information about the Qgis-developer mailing list