Maybe you don't need the QLineEdit at all?Originally Posted by Corran
Just change this step to "save this data to the model".Originally Posted by Corran
Maybe you don't need the QLineEdit at all?Originally Posted by Corran
Just change this step to "save this data to the model".Originally Posted by Corran
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