How to call setModelData with new value from editor if old value is not valid.
My problem is that I receive the data from QlineEdit editor and then I process it. In processing I found it invalid(say wrong value entered by user etc). Now I want that after I have done this validation if the data is not valid user comes back to QLineEdit and shows it editable(i.e. user can put value again).
SGaist Lifetime Qt Champion last edited by
I would say, don't allow to return from you editor until the user has given a valid input. That's not the job of the model to check that.