<div style="font-family: 'Calibri', 'sans-serif';">
<div>Hi Victor,</div><div>for cview in iface.activeComposers() :# will retrieve list of composers</div><div>  print cview.composerWindow().windowTitle() # To print their name</div><div><br></div><div>HTH,</div><div>DelazJ</div>

<br><div id="htc_header">----- Reply message -----<br>De : "Victor Olaya" <volayaf@gmail.com><br>Pour : "qgis-developer" <qgis-developer@lists.osgeo.org><br>Objet : [Qgis-developer] getting list of available QgsComposer<br>Date : dim., août 2, 2015 08:41</div></div><br><pre style="word-wrap: break-word; white-space: pre-wrap;">Hi all,

Can anyone tell me how to get the list of the current composers in a project?

there is a activeCompositions() method in the QgsInterface class, but
it returns a list of QgsComposerView. The problem with that is that
those views do not seem to have a name (the constructor of the class
actually gets a name, but it is not used...)

I need the name to list the composers as part of a plugin, so I guess
i would need the QgsComposer object instead. I could just get the name
from the menu items, but I am sure there must be a cleaner solution...

There seems to be a printComposers() method in the QgisApp class...but
that class is not available from Python.

Any idea?

Thanks in advance!
_______________________________________________
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
</pre>