mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
Merge pull request #11454 from ElderOrb/case7877
7877 Unexpected Behavior when pressing Enter on Input Field
This commit is contained in:
commit
ca4d5ef807
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