QAbstractSpinBox: respond to QEvent::LocaleChange

Add a branch for QEvent::LocaleChange to the QAbstractSpinBox::event()
handler to call updateEdit(). This will update the edit in case the
locale's number features changed (decimal separator etc.).

Task-number: QTBUG-65315
Change-Id: I9015b3a5bbe8e7b80f7bafa13f0f431507bc4cf7
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
bb10
Sven Pauli 2018-01-01 10:24:58 +01:00 committed by Christian Ehrlicher
parent 5155a357cb
commit 5ddaadaa7e
1 changed files with 3 additions and 0 deletions

View File

@ -828,6 +828,9 @@ void QAbstractSpinBox::changeEvent(QEvent *event)
d->reset();
d->updateEditFieldGeometry();
break;
case QEvent::LocaleChange:
d->updateEdit();
break;
case QEvent::EnabledChange:
if (!isEnabled()) {
d->reset();