forked from organicmaps/organicmaps
[qt] Fixed search text input focus issues
This commit is contained in:
parent
42fa09b0a0
commit
62679898d2
2 changed files with 3 additions and 14 deletions
|
@ -34,6 +34,9 @@ SearchPanel::SearchPanel(DrawWidget * drawWidget, QWidget * parent)
|
|||
// for multithreading support
|
||||
connect(this, SIGNAL(SearchResultSignal(search::Result *)),
|
||||
this, SLOT(OnSearchResult(search::Result *)), Qt::QueuedConnection);
|
||||
|
||||
setFocusPolicy(Qt::StrongFocus);
|
||||
setFocusProxy(m_pEditor);
|
||||
}
|
||||
|
||||
template<class T> static void ClearVector(vector<T *> & v)
|
||||
|
@ -95,14 +98,4 @@ void SearchPanel::OnSearchPanelItemClicked(int row, int)
|
|||
}
|
||||
}
|
||||
|
||||
void SearchPanel::showEvent(QShowEvent *)
|
||||
{
|
||||
m_pEditor->setFocus();
|
||||
}
|
||||
|
||||
void SearchPanel::hideEvent(QHideEvent *)
|
||||
{
|
||||
m_pEditor->clearFocus();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -31,10 +31,6 @@ signals:
|
|||
private:
|
||||
void SearchResultThreadFunc(search::Result const & result);
|
||||
|
||||
protected:
|
||||
virtual void showEvent(QShowEvent *);
|
||||
virtual void hideEvent(QHideEvent *);
|
||||
|
||||
public:
|
||||
explicit SearchPanel(DrawWidget * drawWidget, QWidget * parent);
|
||||
~SearchPanel();
|
||||
|
|
Loading…
Add table
Reference in a new issue