22 connect(
this, &QLineEdit::textEdited,
this, [
this] { search(); });
25 void search()
override
27 if(text() != m_proxy.pattern())
29 m_proxy.setPattern(text());
35 if(m_proxy.hasChildren())
37 auto item_to_select = QModelIndex();
38 while(m_proxy.hasChildren(item_to_select))
40 item_to_select = m_proxy.index(0, 0, item_to_select);
42 m_view.setCurrentIndex(item_to_select);
58 std::function<void()> reset;