From b48458673c9d3c48d4d9cbf2d4223cdecd6f6682 Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Mon, 14 Mar 2022 16:03:49 +0800 Subject: [PATCH] Gu: fix readonly AccelLineEdit --- src/Gui/Widgets.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Gui/Widgets.cpp b/src/Gui/Widgets.cpp index db3dfd1233..c5940191bb 100644 --- a/src/Gui/Widgets.cpp +++ b/src/Gui/Widgets.cpp @@ -382,6 +382,11 @@ bool AccelLineEdit::isNone() const */ void AccelLineEdit::keyPressEvent (QKeyEvent * e) { + if (isReadOnly()) { + QLineEdit::keyPressEvent(e); + return; + } + QString txtLine = text(); int key = e->key();