put the caret in the name prompt's line edit
The layer asked the modal's focusWidget() what to focus, but hosting a modal reparents it into a scroll area and a reparent clears the focus its constructor set, so the answer was always nothing and the dialog itself took the keyboard. Modals now name their initial focus widget outright, which survives the hosting. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ne3mejABZoLWKLh8fgpM3x
This commit is contained in:
@@ -52,6 +52,11 @@ bool ModalDialog::isDismissible() const
|
||||
return false;
|
||||
}
|
||||
|
||||
QWidget* ModalDialog::getInitialFocusWidget() const
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void ModalDialog::requestDismiss()
|
||||
{
|
||||
reject();
|
||||
|
||||
Reference in New Issue
Block a user