[QGIS-Developer] How to open a QGIS prococessing algorithm dialog in python?
Enrico Ferreguti
enricofer at gmail.com
Fri Jan 24 07:43:04 PST 2020
Hi QGIS developers,
I would like to programmatically show a processing algoritm dialog from
python. I gived a look to processing toolbox and I found that this is
possible importing and instantiating the class AlgorithmDialog
[gui/processingToolbox.py][1]
from processing.gui.AlgorithmDialog import AlgorithmDialog
from qgis.core import QgsApplication
alg =
QgsApplication.processingRegistry().algorithmById('qgis:extractbyattribute')
dlg = AlgorithmDialog(alg, False, iface.mainWindow())
dlg.show()
dlg.exec_()
This opens algorithm dialog and let me perform processing computations but
once closed the dialog window QGIS become instable and crash without any
message interacting with the user interface.
What am I doing wrong? Is there a method to do this in other way?
I just posted the question on StackExchange:
https://gis.stackexchange.com/questions/348542/open-qgis-prococessing-algorithm-dialog-with-python
Thanks in advance.
Enrico Ferreguti.
[1]:
https://github.com/qgis/QGIS/blob/276a31439eb95f9cdb1053a6ae2dba3f19fbcece/python/plugins/processing/gui/ProcessingToolbox.py#L262
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20200124/3a119569/attachment.html>
More information about the QGIS-Developer
mailing list