I'm working on my first plug-in. In an attempt to validate the user selections on the dialog, I am using a message box to return messages to the user if an error is found. The messgae box displays properly, however when the user selects the ok, the dialog closes along with the message box. How do I control the behavior of the message box so only it will close and not the dialog too?
def validate(self): message = '' if len(self.myListWidget.selectedItems()) == 0: message = 'Choose at least 1 Soil Survey Area' QMessageBox.critical(self, 'Execution Error', message)