[Qgis-developer] Re: how to call qgis signal?

Ricardo Filipe Soares Garcia da ricardo.garcia.silva at gmail.com
Tue Aug 17 08:20:51 EDT 2010


Thanks Jurgen, it is working now!

On Tue, Aug 17, 2010 at 12:37 PM, Jürgen E. <jef at norbit.de> wrote:
> Hi Ricardo,
>
> On Tue, 17. Aug 2010 at 12:32:06 +0100, Ricardo Filipe Soares Garcia da wrote:
>> > def initGui(self):
>> >   some other code
>> >   QObject.connect(self.layerRegistry, SIGNAL("layerWasAdded(QgsMapLayer *theMapLayer)"), self.toggle_plugin_availability)
>> >   QObject.connect(self.layerRegistry, SIGNAL("layerWillBeRemoved(QString theLayerId)"), self.toggle_plugin_availability)
>
> Try:
>      QObject.connect(self.layerRegistry, SIGNAL("layerWasAdded(QgsMapLayer *)"), self.toggle_plugin_availability)
>      QObject.connect(self.layerRegistry, SIGNAL("layerWillBeRemoved(QString)"), self.toggle_plugin_availability)
>
>
> Jürgen
>
> --
> Jürgen E. Fischer         norBIT GmbH               Tel. +49-4931-918175-20
> Dipl.-Inf. (FH)           Rheinstraße 13            Fax. +49-4931-918175-50
> Software Engineer         D-26506 Norden               http://www.norbit.de
>
> --
> norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
> Rheinstrasse 13, 26506 Norden
> GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 
___________________________ ___ __
Ricardo Garcia Silva


More information about the Qgis-developer mailing list