I've read many threads on this but I'm not able to figure out the solution (I'm a beginner to the plugin creation...).
What I what to do is to close the dialog window when the algorithm has finished its job.
That's the piece of code of the alg.dialog.py:
class CreateModelDialog(QDialog, FORM_CLASS): def __init__(self, iface): QDialog.__init__(self) self.iface = iface self.setupUi(self) self.buttonBox.rejected.connect(self.reject) self.buttonBox.button(QDialogButtonBox.Ok).clicked.connect(self.createModel) self.manageGui()........ def createModel(self): modelName = self.bxDBname.text() modelType = self.cmbBxModelType.currentText() lengthString = self.cmbBxLengthUnit.currentText() timeString = self.cmbBxTimeUnit.currentText() workingDir = self.OutFilePath print 'Direttori recuperata ..... ' , workingDir isChild = 1.0 createModel(modelName, workingDir, modelType, isChild, lengthString, timeString)So self.buttonBox.button(QDialogButtonBox.Ok).clicked.connect(self.createModel), when clicked runs the createModel method.
But the dialog remains opended, where should I edit the code?
Thanks!
أكثر...
What I what to do is to close the dialog window when the algorithm has finished its job.
That's the piece of code of the alg.dialog.py:
class CreateModelDialog(QDialog, FORM_CLASS): def __init__(self, iface): QDialog.__init__(self) self.iface = iface self.setupUi(self) self.buttonBox.rejected.connect(self.reject) self.buttonBox.button(QDialogButtonBox.Ok).clicked.connect(self.createModel) self.manageGui()........ def createModel(self): modelName = self.bxDBname.text() modelType = self.cmbBxModelType.currentText() lengthString = self.cmbBxLengthUnit.currentText() timeString = self.cmbBxTimeUnit.currentText() workingDir = self.OutFilePath print 'Direttori recuperata ..... ' , workingDir isChild = 1.0 createModel(modelName, workingDir, modelType, isChild, lengthString, timeString)So self.buttonBox.button(QDialogButtonBox.Ok).clicked.connect(self.createModel), when clicked runs the createModel method.
But the dialog remains opended, where should I edit the code?
Thanks!
أكثر...