Improve handling of focus switch with search widget

This commit is contained in:
Veronica Berglyd Olsen
2024-03-25 11:44:56 +01:00
parent a4d8c22cd0
commit 33e0895cdf
4 changed files with 26 additions and 34 deletions
+6
View File
@@ -138,6 +138,12 @@ class GuiProjectSearch(QWidget):
self._searchResultSelected(items[0], 0)
return
def beginSearch(self) -> None:
"""Focus the search box and select its text, if any."""
self.searchText.setFocus()
self.searchText.selectAll()
return
##
# Events
##