Answer the question
In order to leave comments, you need to log in
How to implement validation of the content of the mutable tableWidget cell?
Please tell me the most appropriate way to check the contents of the edited cell in the table.
It is necessary:
Either to check immediately when entering each character (while the cursor is still blinking, i.e. the closeEditor signal has not been sent) - whether this character meets the requirements, and if not - delete (required) it and display the appropriate message.
Or after pressing Enter or the like, which causes the closeEditor signal - check the entire cell character by character, and if the character does not meet the requirements - return the cell to the previous state (ie , do not allow changes to be saved ) and display a message.
The second option is more preferable than the first.
How to implement it? Preferably with an example (I understand that you need to override the method, but I don’t know exactly how), thanks in advance.
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