mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-25 13:56:39 -04:00
fix searchbar that doesn't search after switching from another app
Same problem as this problem https://github.com/kiwix/kiwix-desktop/pull/180 The openCompletion has to be connected every time the searchbar gains the focus.
This commit is contained in:
parent
a4844b6aea
commit
d92240e3ec
@ -93,6 +93,9 @@ void SearchBar::focusInEvent( QFocusEvent* event)
|
||||
{
|
||||
if (event->reason() == Qt::MouseFocusReason) {
|
||||
clear();
|
||||
}
|
||||
if (event->reason() == Qt::ActiveWindowFocusReason ||
|
||||
event->reason() == Qt::MouseFocusReason) {
|
||||
connect(&m_completer, QOverload<const QModelIndex &>::of(&QCompleter::activated),
|
||||
this, &SearchBar::openCompletion);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user