def validate(self):
if QT5:
if self.edit.text().strip():
self.accept()
else:
if self.edit.text().trimmed():
After Change
def validate(self):
text = self.edit.text()
if hasattr(text, "strip"):
text = text.strip()
else:
text = text.trimmed()
if text:
self.accept()
def postProcess(self):