Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.3.0, 5.8.0, 5.9.0
-
Android and probably other platforms with predictive text input
-
e1a073044855c43ca11e9ada6eedded199c02fc8
Description
QPlainTextEdit shows the placeholderText even when you input text until a space character is inserted. Then the whole word is added to the edit. Similarly if you delete the space the remaining text is replaced with placeholderText.
This happens at least on Android and probably on other platforms with predictive text inputs. I believe the reason is that the input is in pre-edit mode and therefore the editor doesn't see the input. The problem is not reproducible in QTextEdit or in QLineEdit. Those two check that QWidgetTextControl::isPreediting() is false when showing the placeholderText while QPlainTextEdit doesn't check the value.
See the attached screenshot (qtbug_qplaintextedit.PNG): The predictive text shows some text, but the PlainTextEdit placeholderText is shown in the editor. Then pressing space key the text shows up in the editor.
Attaching also the test app.
Attachments
For Gerrit Dashboard: QTBUG-61210 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
196514,3 | QPlainTextEdit: not show place holder when having preedit string | 5.9 | qt/qtbase | Status: MERGED | -2 | 0 |
196766,1 | QPlainTextEdit: not show place holder when having preedit string | 5.6 | qt/qtbase | Status: ABANDONED | 0 | 0 |