How to pad QLineEdit with zeros for number-only entry?
I am building a custom date edit using separate QLineEdit instances for month, day, year. I want to make it so each QLineEdit pads its current value with '0' (zero). I am using QIntValidator to validate the ranges.
I have set the widget mask to for example 'DD' for the month box, but this doesn't pad a single-digit month with a zero.
Anyone know how to do this?
Did you try "DD;\0" for inputMask as described here: http://doc.qt.io/qt-5/qlineedit.html#inputMask-prop