Hi, No idea? Looking the composer manager code[0], it seems that any action, such as deleting, duplicating or renaming a print composer, is processed through interating over all print composers. No direct access. Am I right? Is there no other way? An equivalent of mapLayersByName ? If not, since print composers have now unique name, this will be a good improvement, IMO.
[0] https://github.com/qgis/QGIS/blob/master/src/app/composer/qgscomposermanager.cpp Thanks, DelazJ 2015-07-05 13:23 GMT+02:00 DelazJ <[email protected]>: > Hi, > I have many print composers in a project and would like to select one of > them, knowing its name. The only way I found yet is to iterate over all > composer views : > for cView in iface.activeComposers(): > if cView.composerWindow().windowTitle() == 'myTitle': > # do what I want > > Is this the only way to do it? Isn't there a more direct way to access > print composer? > > Thanks, > DelazJ >
_______________________________________________ Qgis-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-user
