PDA

View Full Version : How to leading 0 in Qspinbox?



akkarachai
16th October 2019, 05:52
In Qspinbox when I select 1 I want add 0 before 1 to be like 01 in the spinbox How can I do that?
sorry for my English.
thank you for your reply:)

Ginsengelf
16th October 2019, 07:05
Hi, you can reimplement QSpinBox::textFromValue() and QSpinBox::valueFromText() to format the displayed string the way you like. You might also have to reimplement QSpinBox::validate().

Ginsengelf