[Qgis-developer] How to access the QgsVisibilityPresetCollection() in pyqgis

Nyall Dawson nyall.dawson at gmail.com
Thu Oct 29 05:55:25 PDT 2015

On 29 October 2015 at 23:31, Alexandre Neto <senhor.neto at gmail.com> wrote:
> Is it possible to access to presets in a project using PyQgis? I found
> QgsVisibilityPresetCollection() in QGIS API, but I can't seem to find how to
> access the current one used by the active project.

You access it through the project instance (in 2.12 at least... it
wasn't accessible to PyQGIS in previous versions). See


> My plans were to create a plugin that allows to manage all the projec
> presets. Things like update or rename a preset (without the need to remove
> the current ones), and also return a list of presets to be used in Map
> Composition.
> Thanks
> Alexandre Neto
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer

More information about the Qgis-developer mailing list