After search dialog is openned, auto set focus to the control for keyword.

This commit is contained in:
Roy Qu 2024-04-05 12:24:24 +08:00
parent c64558e137
commit e2aacd2361
2 changed files with 4 additions and 4 deletions

View File

@ -43,7 +43,7 @@ void SearchDialog::find(const QString &text)
{
mTabBar->setCurrentIndex(mSearchTabIdx);
ui->cbFind->setCurrentText(text);
ui->btnNext->setFocus();
ui->cbFind->setFocus();
show();
}
@ -51,8 +51,8 @@ void SearchDialog::replace(const QString &text)
{
mTabBar->setCurrentIndex(mReplaceTabIdx);
ui->cbFind->setCurrentText(text);
ui->btnNext->setFocus();
//ui->cbReplace->setCurrentText("");
ui->cbReplace->setCurrentText(text);
ui->cbFind->setFocus();
show();
}

View File

@ -55,7 +55,7 @@ SearchInFileDialog::~SearchInFileDialog()
void SearchInFileDialog::findInFiles(const QString &text)
{
ui->cbFind->setCurrentText(text);
ui->btnExecute->setFocus();
ui->cbFind->setFocus();
show();
}