Focus lineedit when search is shown
This commit is contained in:
committed by
craig.p.drummond
parent
8fe131d4a6
commit
41303e6d6a
@@ -804,12 +804,7 @@ void ItemView::showIndex(const QModelIndex &idx, bool scrollTo)
|
||||
|
||||
void ItemView::focusSearch()
|
||||
{
|
||||
if (searchWidget->isVisible()) {
|
||||
searchWidget->close();
|
||||
} else {
|
||||
searchWidget->setVisible(true);
|
||||
searchWidget->setFocus();
|
||||
}
|
||||
searchWidget->toggle();
|
||||
}
|
||||
|
||||
void ItemView::setStartClosed(bool sc)
|
||||
|
||||
@@ -55,6 +55,7 @@ void SearchWidget::toggle()
|
||||
close();
|
||||
} else {
|
||||
show();
|
||||
setFocus();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user