Answer the question
In order to leave comments, you need to log in
How to highlight a QLineEdit cell and display an invalid input message?
I am intercepting the text change signal in a cell. The input must be within a certain range. When out of range, I deactivate the button, I would like to highlight the cell and show a message about invalid input. How can this be done? The function code for interception is given.
def on_text_changed_tapv(self, text):
if text == "":
pass
elif float(text.replace(',', '.')) < 0.16 or float(text.replace(',', '.')) > 1.0:
self.ui.lineEdit_tapv.setModified(False)
self.ui.pushButton.setEnabled(False)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question