[QGIS-Developer] Processing algorithm to open up external dialog window

Nyall Dawson nyall.dawson at gmail.com
Mon Feb 14 17:59:42 PST 2022


On Tue, 15 Feb 2022 at 01:34, C Hamilton <adenaculture at gmail.com> wrote:

> Is there a QgsProcessingAlgorithm method that is called after the output layer has been added to the QGIS layers panel? If there is then at that point I should be able to add it to my dialog box.

You have to use QgsProcessingLayerPostProcessorInterface for this -- see:
https://qgis.org/pyqgis/master/core/QgsProcessingLayerPostProcessorInterface.html
and
https://qgis.org/pyqgis/master/core/QgsProcessingContext.html#qgis.core.QgsProcessingContext.LayerDetails.setPostProcessor

(or an example here: https://gis.stackexchange.com/a/401440/28443 )

Nyall


More information about the QGIS-Developer mailing list