1

I'm writing a plugin for QGIS and inside the method def run(self), after the OK button of the plugin is clicked, i.e., inside

# Run the dialog event loop
result = self.dlg.exec_()
# See if OK was pressed
if result == 1:
    .
    .

I have a test about some variables. If the test fails, I write a message using

QMessageBox.about(None,"Warning","Some text")

Then I would like to run again the plugin. I tried to execute the code

self.run()

after the QMessageBox, but the behavior is quite strange, because sometimes the same QMessageBox appears again and again. So, how could I run again the plugin?

Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.