Quantcast
Channel: Jobs
Viewing all articles
Browse latest Browse all 18427

QRegExp not Accepting Modifier Values ?

$
0
0
Hi… I have a QLineEdit and a QStringList. My String List contains “m/s^2”, “m/min^2”, “m/s^3”, “m/min^3” strings in it (^ denotes the Power of value). My Line Edit should accept only the characters which are present in the StringList.. I solved that and it Works Fine. Now, the Problem is, My RegExp is Not Accepting the ^[SHIFT + 6 key]. I cannot enter that power symbol in my QLineEdit. Other characters like “m”, “/” are working Fine… Can u plz Suggest me Why this QRegExp not Accepting the Modifier Values? Here’s my Code: QString regExpression = "("; for (int i = 0; i < getStringList()->size(); ++i) {     regExpression.append(getStringList()->at(i) + "|"); }   QRegExp rE(regExpression); q_LineEdit->setValidator(new QRegExpValidator(rE, this));

Viewing all articles
Browse latest Browse all 18427

Trending Articles