QRegExp| Find every elements with specific word in QSortFilterProxyModel
Solved
General and Desktop
-
Hello,
I want to use QLineEdit to find elements in model. I have problem with QRegExp, I can't create regular expression to find every phrases in rows. For example I have model with these rows:- SPEEDabc
- abcSPEED
- abcSPEEDdef
- qwerty
a when I type "SPEED" in QLineEdit it sholuld show only: - SPEEDabc
- abcSPEED
- abcSPEEDdef
wihout - qwerty
Do you know how create QRegExp to solve this problem?
-
Hi,
Unless you are locked to Qt 4, please move to QRegularExpression.
So you would like something like ".*SPEED.*" ?
-
I fixed the expression. The rendering was wrong.