mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 13:49:46 +02:00
Merge pull request #11575 from ElderOrb/QTBUG-49297
workaround for https://bugreports.qt.io/browse/QTBUG-49297
This commit is contained in:
commit
1227168939
1 changed files with 14 additions and 0 deletions
|
@ -39,6 +39,20 @@ TextField {
|
||||||
|
|
||||||
y: textFieldLabel.visible ? textFieldLabel.height + textFieldLabel.anchors.bottomMargin : 0
|
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 {
|
style: TextFieldStyle {
|
||||||
textColor: {
|
textColor: {
|
||||||
if (isLightColorScheme) {
|
if (isLightColorScheme) {
|
||||||
|
|
Loading…
Reference in a new issue