mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-17 05:58:28 +02:00
workaround for https://bugreports.qt.io/browse/QTBUG-49297
This commit is contained in:
parent
742cf0debe
commit
dcdf85b08e
1 changed files with 14 additions and 0 deletions
|
@ -39,6 +39,20 @@ TextField {
|
|||
|
||||
y: textFieldLabel.visible ? textFieldLabel.height + textFieldLabel.anchors.bottomMargin : 0
|
||||
|
||||
// workaround for https://bugreports.qt.io/browse/QTBUG-49297
|
||||
Keys.onPressed: {
|
||||
switch (event.key) {
|
||||
case Qt.Key_Return:
|
||||
case Qt.Key_Enter:
|
||||
event.accepted = true;
|
||||
|
||||
// emit accepted signal manually
|
||||
if (acceptableInput) {
|
||||
accepted();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
style: TextFieldStyle {
|
||||
textColor: {
|
||||
if (isLightColorScheme) {
|
||||
|
|
Loading…
Reference in a new issue