diff options
Diffstat (limited to 'qt-ui/simplewidgets.cpp')
-rw-r--r-- | qt-ui/simplewidgets.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp index 05532f805..b31261518 100644 --- a/qt-ui/simplewidgets.cpp +++ b/qt-ui/simplewidgets.cpp @@ -464,3 +464,15 @@ TagFilter::TagFilter(QWidget *parent) : QWidget(parent) connect(ui.filterTag, SIGNAL(textChanged(QString)), filter, SLOT(setFilterFixedString(QString))); ui.tagView->setModel(filter); } + +void TagFilter::showEvent(QShowEvent *event) +{ + TagFilterSortModel::instance()->addFilterModel(TagFilterModel::instance()); + QWidget::showEvent(event); +} + +void TagFilter::hideEvent(QHideEvent *event) +{ + TagFilterSortModel::instance()->removeFilterModel(TagFilterModel::instance()); + QWidget::hideEvent(event); +} |