[Qgis-developer] getting list of available QgsComposer

Victor Olaya volayaf at gmail.com
Sat Aug 1 23:41:06 PDT 2015


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!


More information about the Qgis-developer mailing list