If you want to restrict QLineEdit's input, use an inputMask (set to "9" in your case -- this allows a single digit [0-9]).
If you want to restrict QLineEdit's input, use an inputMask (set to "9" in your case -- this allows a single digit [0-9]).
In the end I revised my whole approach. Now I install an eventFilter on the table which only when it recieves keys 1-9 it sets the numbers and ignores all other key presses. It's got exactly the functionallity I need and it does away with the mess of a custom delegate I was using which never seems to work the way it should.
Bookmarks