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
4
votes
0answers
133 views

QGIS 3: Set custom project variables with input dialog

I am using QGIS 3.10.0 and Windows 10. I have a project where I want the user to define custom project variables. I want to make this user friendly, I don't want the user to need to open the project ...
1
vote
1answer
378 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
832 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
381 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, ...