[Qgis-developer] writeMapLayer not connecting in Python

Nathan Woodrow madmanwoo at gmail.com
Wed Oct 30 06:23:44 PDT 2013


Hey all,

I seem to be having issues with connecting to QgsProject::writeMapLayer in
Python.
Using new style connections I get an error:

>>> QgsProject.instance().writeMapLayer.connect(layerwrite)

yields

TypeError: connect() failed between
writeMapLayer(QgsMapLayer*,QDomElement,QDomDocument) and unislot()

Trying to connect using the old style connect just doing ever get called:

def write2(layer, dom, dom2):
    print layer, dom, dom2

QObject.connect(QgsProject.instance(), SIGNAL("writeMapLayer( QgsMapLayer,
QDomElement, QDomDocument )"), write2)

This should be called when ever the project is saved and the layer is
written however it just never calls the slot.

Doing something wrong?

- Nathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20131030/7f52cd0d/attachment-0001.html>


More information about the Qgis-developer mailing list