QSpinBox ValueChanged is fired many times

c++, qspinbox, qt, signals-slots

Solution

Finally I found the `keyboardTracking` property in Qt Documentation. Easy to set, and works like a charm!

Problem

Let's suppose I have a QSpinBox with a value 123.45 in it. If I manually edit it and start erasing the five, valueChanged is fired for the value 123.4. Happens again if I go on erasing the four. And it's also fired if I press enter after finishing editing. I guess the problem is I should use void QAbstractSpinBox::editingFinished () instead of valueChanged, but it looks like valueChanged were the recommended approach as there are many more examples ans usage in my oppinion, so I want to be sure about this. Any idea?

Original source