Details
-
Bug
-
Resolution: Cannot Reproduce
-
P2: Important
-
None
-
5.10.1, 5.12.2
-
Android 6.0.1 (API32)
Description
class LineEdit : public QLineEdit { Q_OBJECT public: LineEdit(QWidget *parent = 0) : QLineEdit(parent) {} protected: void inputMethodEvent(QInputMethodEvent *e) { QString preedtingStr = e->preeditString(); QString commitStr = e->commitString(); QLineEdit::inputMethodEvent(e); } }
If I enter the first character, for example "A" - inputMethodEvent() will be called twice, and the text is saved:
- In the first call preeditingStr is "A" and commitStr is "";
- In the second call preeditingStr is "" and commitStr is "A";
- onTextChanged() was emited
If I enter the second character, for example, "B" - inputMethodEvent () will be called once:
- In the first call preeditingStr is "B" and commitStr is "";
If I enter the third character, for example "C" - inputMethodEvent() will be called once:
- In the first call preeditingStr is "C" and commitStr is "";
If I enter space - inputMethodEvent() will be called twice, and the text is saved:
- In the first call preeditingStr is "A" and commitStr is "";
- In the second call preeditingStr is "" and commitStr is "A";
- onTextChanged() was emited