Answer the question
In order to leave comments, you need to log in
How to return the content in the cell editor with invalid data?
Hello,
I have a table, a model associated with it, and a delegate for some columns whose cells need to be editable. I need to make it so that if the user entered the wrong data, then after pressing Enter, the cell had the old data (before editing). Will it be enough if the setData function of the model will be checked and incorrect data will simply not be written?
Answer the question
In order to leave comments, you need to log in
We read the doc .
When editing data, we can filter it both in the delegate and in the model.
In the model, it is worth handling errors associated with the data structure or with the underlying abstracted layer. Others, it's better to filter in the delegate.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question