On 8 September 2014 21:52, Alexandre Neto <[email protected]> wrote:
> Hello all,
>
> For an expression function I'm trying to select a composition by searching
> for the composer name/title.
>
> I know I can get all active composers by using:
>
>> composers = iface.activeComposers()
>
>
> I can then access to the QgsComposerView by iterating the composers list:
>
>> for composer_view in composers:
>>     print composer_view
>
>
> and that in the composerview there is a QgsComposition:
>
>> composition = composer_view.composition()

It's not stored in QgsComposition (unfortunately... this needs to
change sometime!). Try:

for composer_view in composers:
   print composer_view.composerWindow().windowTitle()


Nyall
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to