Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
5.11.1
-
None
Description
Under https://doc.qt.io/qt-5/qsortfilterproxymodel.html#filtering . the docs state:
"A common use case is to let the user specify the filter regexp, wildcard pattern, or fixed string in a QLineEdit and to connect the textChanged()signal to setFilterRegExp(), setFilterWildcard(), or setFilterFixedString() to reapply the filter."
Please put in snippets of how to do that. Something like:
// Using function pointers (recommended): connect(myFilterLine, &QLineEdit::textChanged, proxyModel, &QSortFilterProxyModel::setFilterRegExp); // Using the older SIGNAL/SLOT approach (not recommended): connect(myFilterLine, SIGNAL(textChanged(const QString &)),&proxyModel, SLOT(setFilterRegExp(const QString &)));