Thanks Nyall!
I did what you have suggested: in fact opening manually the new XML as a
.qpt file into QGIS everything works perfectly, and I can manually export a
map.
But it doesn't work in the stand-alone script, which is what I need.
I didn't know that QgsMapRenderer is deprecated in 2.4, this is probably
causing the problem.
I will try to use the QgsMapSettings object instead of it!
Thanks for the hints!
Andrea

On Wed, Oct 1, 2014 at 10:12 PM, Nyall Dawson <[email protected]>
wrote:

>
> On 02/10/2014 2:55 am, "Andrea Amparore" <[email protected]>
> wrote:
> >
> > Thanks Andreas!
> >
> > Actually I need to do it with a script, because the serial printing is a
> part of a much more complex script.
> >
> > It works on QGIS 2.2, but on QGIS 2.4 it drives me crazy…
>
> Two things:
> - QgsMapRenderer is deprecated in 2.4 and above. You should update your
> code to use the new replacement QgsMapSettings object.
>
> - Why don't you try saving the XML templates from your script to qpt files
> and then try loading them manually into QGIS? That might give you a better
> idea where your script is breaking.
>
> Nyall
>
_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to