Hello all,

Since QGIS 2.6, the LoadFromTemplate method seems not work any more (or works differently?)

This is my code to add items in my composer from a template :

|self.composition=  self.composerView.composition()
file1=QtCore.QFile('ComposerTemplate.qpt')
doc=QtXml.QDomDocument()
doc.setContent(file1,  False)
self.composition.loadFromTemplate(doc,  substitutionMap=None,  
addUndoCommands=False)|

Up to 2.4 version, this code worked great. But since the last QGIS update, nothing is imported from the template. I do not get either error messages.

I've readen in QGIS changelogs, that the "Load from template" button is replaced by a "softer" "Add items from template" one. But it's in the GUI... In the API doc, the LoadFromTemplate method is still present. And should still work?
Has anybody else encountered this problem?

Thanks
Vincent

--

Vincent Damoy - Responsable SIG
Conservatoire d'espaces naturels du Nord et du Pas-de-Calais
152 bd de Paris - 62190 Lillers
Tél : 03.21.54.75.00 - Fax : 03.21.54.56.07
/*Pour adhérer au Conservatoire :* www.cen-npdc.org/nous-rejoindre/adherent.html/


_______________________________________________
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to