aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickspinbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quicktemplates2/qquickspinbox.cpp')
-rw-r--r--src/quicktemplates2/qquickspinbox.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/quicktemplates2/qquickspinbox.cpp b/src/quicktemplates2/qquickspinbox.cpp
index fcce8374..72dac1c6 100644
--- a/src/quicktemplates2/qquickspinbox.cpp
+++ b/src/quicktemplates2/qquickspinbox.cpp
@@ -648,7 +648,7 @@ void QQuickSpinBox::keyReleaseEvent(QKeyEvent *event)
Q_D(QQuickSpinBox);
QQuickControl::keyReleaseEvent(event);
- if (event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return)
+ if (d->editable && (event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return))
d->updateValue();
d->up->setPressed(false);
@@ -740,7 +740,7 @@ void QQuickSpinBox::itemChange(ItemChange change, const ItemChangeData &value)
{
Q_D(QQuickSpinBox);
QQuickControl::itemChange(change, value);
- if (change == ItemActiveFocusHasChanged && !value.boolValue)
+ if (d->editable && change == ItemActiveFocusHasChanged && !value.boolValue)
d->updateValue();
}