🐛 fix: QSortFilterProxyModel::begin/endFilterChange is available since 6.9
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user