Fix disabled IME when QPlainTextEdit read only property is toggled
Mirror the behavior of working QTextEdit in QPlainTextEdit. The WA_InputMethodEnabled flag was overridden by the following call to setTextInteractionFlags(). Task-number: QTBUG-55699 Change-Id: I46402f5d94204acd304d56f488bb0fb342d1a846 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
This commit is contained in:
parent
f286027e6b
commit
47bbc6d6f6
@ -2633,8 +2633,8 @@ void QPlainTextEdit::setReadOnly(bool ro)
|
||||
} else {
|
||||
flags = Qt::TextEditorInteraction;
|
||||
}
|
||||
setAttribute(Qt::WA_InputMethodEnabled, shouldEnableInputMethod(this));
|
||||
d->control->setTextInteractionFlags(flags);
|
||||
setAttribute(Qt::WA_InputMethodEnabled, shouldEnableInputMethod(this));
|
||||
QEvent event(QEvent::ReadOnlyChange);
|
||||
QApplication::sendEvent(this, &event);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user