Browse Source

Set proper focus on widget

And also allow keyboard tabbing to the Browse button.
Fix up 6ab35512da.
adaptive-webui-19844
Chocobo1 2 years ago
parent
commit
855f727451
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 4
      src/gui/fspathedit.cpp

4
src/gui/fspathedit.cpp

@ -178,6 +178,10 @@ FileSystemPathEdit::FileSystemPathEdit(Private::IFileEditorWithCompletion *edito @@ -178,6 +178,10 @@ FileSystemPathEdit::FileSystemPathEdit(Private::IFileEditorWithCompletion *edito
Q_D(FileSystemPathEdit);
editor->widget()->setParent(this);
setFocusProxy(editor->widget());
// required, otherwise the button cannot be selected via keyboard tab
setTabOrder(editor->widget(), d_ptr->m_browseBtn);
auto *layout = new QHBoxLayout(this);
layout->setContentsMargins(0, 0, 0, 0);
layout->addWidget(editor->widget());

Loading…
Cancel
Save