My objective is to use a QSpinBox
to display the numbers from 0 to 9999 with the increasement of 1 using 4-digits format.
I managed to set the Maximum value 9999 by using setMaximum
command. But I can't seems to find a way to display the values in 4digits format (eg. 0000, 0001,0002). Whenever i set the value to 0000 using setValue
, the SpinBox display as 0.
How do i display the numbers in 4-digits format (i.e adding leading zero as required) in QSpinBox
?