🐛 fix: QSortFilterProxyModel::begin/endFilterChange is available since 6.9

This commit is contained in:
2026-03-01 00:07:14 +01:00
parent 911698ea72
commit 17b18e6ff1
+6
View File
@@ -10,10 +10,16 @@ ProxyModel::ProxyModel(QObject* parent)
void ProxyModel::setSearchText(const QString& text) {
if (m_searchText != text) {
#if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0)
beginFilterChange();
#endif
m_searchText = text;
setFilterFixedString(text);
#if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0)
endFilterChange();
#elif
invalidateFilter();
#endif
}
}