From 35b2beb4fba153c952b00c6f9adf450520a9c6cf Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Sat, 9 Jan 2021 17:15:37 +0000 Subject: library: added quick search git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9623 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/General/library/librarywidget.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/plugins/General/library/librarywidget.cpp') diff --git a/src/plugins/General/library/librarywidget.cpp b/src/plugins/General/library/librarywidget.cpp index ab7664d00..041ff0e13 100644 --- a/src/plugins/General/library/librarywidget.cpp +++ b/src/plugins/General/library/librarywidget.cpp @@ -50,5 +50,14 @@ LibraryWidget::~LibraryWidget() void LibraryWidget::refresh() { + m_ui->filterLineEdit->clear(); m_model->refresh(); } + +void LibraryWidget::on_filterLineEdit_textChanged(const QString &text) +{ + m_model->setFilter(text); + m_model->refresh(); + if(text.count() >= 3) + m_ui->treeView->expandAll(); +} -- cgit v1.2.3-13-gbd6f