Auto-set focus on keybind dialog

This commit is contained in:
=
2025-04-19 20:04:00 -07:00
parent f199fa5ce4
commit 34620f3246
5 changed files with 7 additions and 4 deletions

View File

@@ -65,6 +65,7 @@ KeyBinder::KeyBinder(QWidget *parent)
singleKeySequenceEdit *seq = new singleKeySequenceEdit();
ui->formLayout->addRow(seq);
seq->setObjectName("keySequence");
this->setTabOrder(seq, ui->buttonBox);
}
KeyBinder::~KeyBinder()
@@ -72,6 +73,11 @@ KeyBinder::~KeyBinder()
delete ui;
}
void
KeyBinder::showEvent( QShowEvent* event ) {
QWidget::showEvent( event );
this->findChild<QKeySequenceEdit*>()->setFocus();
}
bool KeyBinder::eventFilter(QObject *obj, QEvent *event)
{