[QGIS-Developer] Generate legend and export as Image
M S.
msel.mobicom at gmail.com
Mon Sep 28 05:11:11 PDT 2020
hi all.
i was able to generate a legend when i was using QGIS 2.18 by
QgsComposerLegend().Then i used to export it with help of QImage().
But now i use QGIS 3.10 and i have to use QgsPrintLayout() and
QgsLayoutItemLegend() to generate legend and i export it via
QgsLayoutExporter(). But i have some issue with that:
1. it exceeds or crops legend content.
2. i got below error message when i create more than one object of my class
which has QgsPrintLayout() object : "RuntimeError: wrapped C/C++ object of
type QgsPrintLayout has been deleted"
can you please guide me about this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20200928/9cf2b908/attachment.html>
More information about the QGIS-Developer
mailing list