[Qgis-user] Problem connecting to a signal

Martin Dobias wonder.sk at gmail.com
Fri Nov 14 15:45:55 PST 2008


Hi!

On Fri, Nov 14, 2008 at 1:05 PM, Möri Cedric <Cedric.Moeri at bd.so.ch> wrote:
>
> def toggle(self)
>  mc = self.iface.mapCanvas()
>  layer = mc.currentLayer()
>
>  QObject.connect(layer,SIGNAL("editingStarted()"),self.test)
>
> The problem is that the error console keeps me telling that "argument 1 of QObject.connect() has an invalid type".  A print of layer gives <qgis.core.QgsVectorLayer object at ...> so I guess my layer is a QgsVectorLayer.
>
> Anybody an idea what I'm doing wrong?

In fact you're not doing anything wrong! There was a forgotten problem
in PyQGIS causing this. I've fixed it in SVN revision 9637. Thanks for
pointing this out!

Regards
Martin



More information about the Qgis-user mailing list