Questions tagged [macro]

QGIS Python macro which can be executed when a project is opened, saved and/or closed.

Filter by
Sorted by
Tagged with
1
vote
1answer
215 views

Set zoom level to display full extent of specific layer when starting a project in QGIS

I have project in QGIS 3.2 with different shapefiles and WMS layer. When I start the projectfile (.qgs) I want the extent of the map to be the same as one specific WMS layer (same as the option "zoom ...
15
votes
1answer
608 views

How to apply changes in QSettings immediately?

With PyQGIS, you can change various settings such as making the groups in the Layers Panel (or table of contents) bold: from PyQt4.QtCore import QSettings QSettings().setValue("/Qgis/legendGroupsBold"...
3
votes
1answer
264 views

Is it possible to read/write macros using PyQGIS?

Macros are saved in the .qgs project file. However, looking at the QgsProject Class, there is no mention of a method to read or write a macro. Other than dangerously editing the .qgs project file, ...