Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.11.0
-
None
Description
TextInput has the onAccpeted signal emitted when the used presses return or enter while editing the field, but this does not actually accept the event
from qquicktextinput.cpp, processKeyEvent():
...
emit q->accepted();
}
event->ignore();
...
This is a problem if the parent of the TextInput does something with the key event itself, which will be managed even if it's completely unexpected as no other key even besides enter/return was propagated
QtQuickControls2 LineEdit is also affected, being a subclass of TextInput
The problem was noted first with a QDialog that contained a QQuickWidget which had some lineedits, and pressing return with the focus on any of the line edits, unexpectedly closed the qdialog