[Qgis-developer] overload closeEvent in AlgorithmDialog.py [CLOSED]
enrico chiaradia
enrico.chiaradia at yahoo.it
Fri Mar 24 10:36:08 PDT 2017
I found that the most convenient way is to create a custom
"AlgorithmDialog" class where reimplement the closeEvent function.
Custom dialog must be loaded implementing the getCustomParametersDialog
in the custom geoalgorithm.
here the class:
class CustomAlgorithmDialog(AlgorithmDialog):
def __init__(self, alg):
AlgorithmDialog.__init__(self, alg)
def closeEvent(self, evnt):
# do something of 'extraordinary'
print 'something'
# call original function
super(CustomAlgorithmDialog, self).closeEvent(evnt)
here the function to implement in the custom geoalgorithm:
def getCustomParametersDialog(self):
return CustomAlgorithmDialog(self)
Nothing extraordinary, just to close the question.
enrico
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20170324/9816879a/attachment.html>
More information about the Qgis-developer
mailing list