[QGIS-Developer] Signal/slots in Processing scripts/algorithms

Nyall Dawson nyall.dawson at gmail.com
Sun Jul 22 15:25:30 PDT 2018


On Fri, 20 Jul 2018 at 22:54, matteo <matteo.ghetta at gmail.com> wrote:
>
> Hi devs,
>
> is there a way to update a widget (e.g. setting a ComboBox as not
> enabled) depending on another widget within a Processing script?
>
> Something like:
>
> if val == 'whatever':
>   self.processingComboBox.setEnabled(False)

Not really - Processing doesn't currently have any support for
dependencies amongst parameters. You could maybe hack around this by
directly accessing widgets, but that wouldn't be version safe and
would be quite fragile.

The "canonical" way to handle this currently is to throw an error when
the algorithm is executed if the combination of parameters does not
make sense.

Nyall


>
>
> Thanks for all the hints
>
> Cheers
>
> Matteo
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


More information about the QGIS-Developer mailing list