Reputation: 17120
How in qt constrain what can be typed in lineedit? I would i.e. want user to enter just digits but not letters.
Upvotes: 2
Views: 93
Reputation: 12321
Check the setValidator function and the inputMask property. If you need something more complex than just numbers it is very easy to subclass QValidator and use it.
Upvotes: 4