mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-05 01:23:24 -08:00
[UI] Defer refocus on Tab to avoid focus chain issues
This commit is contained in:
parent
4b7aa8f1c2
commit
4607b7d3ad
1 changed files with 2 additions and 1 deletions
|
|
@ -71,7 +71,8 @@ void LineEditCompleter::focusOutEvent(QFocusEvent *e)
|
|||
|
||||
if (popupWasVisible && e->reason() == Qt::TabFocusReason) {
|
||||
// Refocus the edit so Tab doesn't move focus away
|
||||
setFocus();
|
||||
// Use a queued connection to ensure focus is restored after the focus change completes
|
||||
QMetaObject::invokeMethod(this, "setFocus", Qt::QueuedConnection);
|
||||
e->accept();
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue