<div dir="ltr"><div><div>Hi all,<br><br></div>I'm porting an existing Geoprocessing Algorithm plugin to QGIS 3 and I'm having some trouble customizing the default dialog.<br></div><div></div>On QGIS 2.x the following code worked:<br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">class TestAlgorithm(GeoAlgorithm):<br> INPUT = 'INPUT'<br> OUTPUT = 'OUTPUT'<br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div> </div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> def getCustomParametersDialog(self):<br> customDialog = AlgorithmDialog(self)<br> customDialog.textShortHelp.setFixedWidth(450)<br> return customDialog<br></blockquote><div><br></div><div>On QGIS 3 however, the
getCustomParametersDialog() method is gone. I assumed it was replaced by the new createCustomParametersWidget(), but unfortunately this method doesn't seem to get called by the parent class:<br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> def createCustomParametersWidget(self, parent):<br> customDialog = AlgorithmDialog(self)<br> customDialog.textShortHelp.setFixedWidth(450)<br> return customDialog<br></blockquote><div><br></div><div>I also tried manually creating the dialog, but I get a message saying that
the <b>'AlgorithmDialog'
object has no attribute 'textShortHelp'.</b><br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">alg = QgsApplication.processingRegistry().algorithmById('test:testAlgorithm')<br>dlg = AlgorithmDialog(alg)<br>dlg.textShortHelp.setFixedWidth(450)<br>dlg.show()<br></blockquote><div><br></div><div>Any thoughts?<br><br></div><div>Thanks in advance!<br>André<br></div></div></div></div>