Quantcast
Channel: QtWebEngine
Viewing all articles
Browse latest Browse all 13965

[SOLVED] QSortFilterProxyModel filter whole word.

$
0
0
For my tableView I am using a QSortFilterModel to which a QRegExp is set QRegExp exp;    if (isWholeWord) // checkbox for whole words         exp.setPattern(QString("^%1$").arg(text));     else         exp.setPattern(text);       exp.setPatternSyntax(QRegExp::FixedString);       exp.setCaseSensitivity(isCaseSensitive ? Qt::CaseSensitive : Qt::CaseInsensitive);       m_proxyModel->setFilterRegExp(exp); As per the documentation of QRegExp [qt-project.org] it should work , i tried with exp.indexIn(text) and it return 0 but the model does not show anything. what am I missing ?

Viewing all articles
Browse latest Browse all 13965

Trending Articles