lastSel_ = filterModel_->mapToSource(filterModel_->index(sel, 0)).row();
filter_ = s;
+#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
+ filterModel_->setFilterRegExp(charFilterRegExp(filter_));
+#else
filterModel_->setFilterRegularExpression(charFilterRegExp(filter_));
+#endif
countCategories();
// restore old selection
lastSel_ = filterModel_->mapToSource(filterModel_->index(sel, 0)).row();
filter_ = s;
+#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
+ filterModel_->setFilterRegExp(charFilterRegExp(filter_));
+#else
filterModel_->setFilterRegularExpression(charFilterRegExp(filter_));
+#endif
countCategories();
// restore old selection