config_widget doesn't allow early exit
When using config_widget to customize my plugin, I want to check if certain conditions are met (device connected) and if not show an error dialog and exit the routine. I can do the check and dialog and exit, but not cleanly.
I noticed in the source that I can return None or raise a NotImplemented error or a QWidget. I currently return None so that the customization_help routine runs with my error message. But this shows a text entry box under the text message I display. Using a QWidget is just as messy as it requires and shows an empty table. Raising the error causes an error message.
Any suggestions of code to use in config_widget to show just an error dialog and exit?
Is there a pre-validate method to match the validate method?