mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 06:44:06 +02:00
7877 Unexpected Behavior when pressing Enter on Input Field
This commit is contained in:
parent
191066a111
commit
5502a639e2
1 changed files with 7 additions and 0 deletions
|
@ -116,6 +116,13 @@ Item {
|
|||
wrapMode: Text.WordWrap
|
||||
readOnly: false // we need to leave this property read-only to allow control to accept QKeyEvent
|
||||
selectByMouse: false
|
||||
|
||||
Keys.onPressed: {
|
||||
if (event.key == Qt.Key_Return) {
|
||||
mirrorText.text = "";
|
||||
event.accepted = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea { // ... and we need this mouse area to prevent mirrorText from getting mouse events to ensure it will never get focus
|
||||
|
|
Loading…
Reference in a new issue