QSpinBox ValueChanged is fired many times

Roman Rdgz picture Roman Rdgz · Apr 19, 2012 · Viewed 7.9k times · Source

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?

Answer

Roman Rdgz picture Roman Rdgz · Apr 19, 2012

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