[Qgis-user] Serial map from template composer. Working with QGIS 2.2, problems with QGIS 2.4

Andrea Amparore andrea.amparore at gmail.com
Wed Oct 1 14:15:50 PDT 2014


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 <nyall.dawson at gmail.com>
wrote:

>
> On 02/10/2014 2:55 am, "Andrea Amparore" <andrea.amparore at gmail.com>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20141001/bb383ee3/attachment.html>


More information about the Qgis-user mailing list