m3rlin
17th March 2013, 07:06
Hi,
I am experiencing some difficulties to correctly using validation on a QLineEdit for Hebrew Character Classes.
I have tried using the UTF Range with \u0590-\u05FF or \x0590-\x05FF and scripts like \p{Hebrew} or \p{InHebrew}.
I also guestimated the eating of backslashes so I tried \\ double slash and even an actual slash with \\\\.
At one point, I wondered if I needed to install PCRE support, but then assumed that I don't need to conform with Perl Style validation so I left that subject.
I have set the QRegExpValidator to using the QLocale::Hebrew (and get a proper response: the Israeli country code ).
Whatever I have tried so far doesn't validate any Hebrew characters in a QLineEdit.
I am using KDE/Linux with Hebrew Language support. My default system locale = en-US.
My Qt version is 4.8.0. 32-bit with Creator 2.4.1
Maybe I am missing something, and someone could point me into the correct direction? Below is the validation code that I attempted. I left the RegEx's out, since I mentioned them above.
QRegExp qrxRegEx( " Dunno what to do here to Validate for Hebrew Characters ");
QValidator* qValLineEdits;
qValLineEdits = new QRegExpValidator( qrxRegEx, this );
qValLineEdits->setLocale( QLocale::Hebrew );
QLocale qLocHeb = qValLineEdits->locale();
qDebug() << qLocHeb.name() << endl;
ui->leBugRepPersInfoName->setValidator( qValLineEdits );
I am experiencing some difficulties to correctly using validation on a QLineEdit for Hebrew Character Classes.
I have tried using the UTF Range with \u0590-\u05FF or \x0590-\x05FF and scripts like \p{Hebrew} or \p{InHebrew}.
I also guestimated the eating of backslashes so I tried \\ double slash and even an actual slash with \\\\.
At one point, I wondered if I needed to install PCRE support, but then assumed that I don't need to conform with Perl Style validation so I left that subject.
I have set the QRegExpValidator to using the QLocale::Hebrew (and get a proper response: the Israeli country code ).
Whatever I have tried so far doesn't validate any Hebrew characters in a QLineEdit.
I am using KDE/Linux with Hebrew Language support. My default system locale = en-US.
My Qt version is 4.8.0. 32-bit with Creator 2.4.1
Maybe I am missing something, and someone could point me into the correct direction? Below is the validation code that I attempted. I left the RegEx's out, since I mentioned them above.
QRegExp qrxRegEx( " Dunno what to do here to Validate for Hebrew Characters ");
QValidator* qValLineEdits;
qValLineEdits = new QRegExpValidator( qrxRegEx, this );
qValLineEdits->setLocale( QLocale::Hebrew );
QLocale qLocHeb = qValLineEdits->locale();
qDebug() << qLocHeb.name() << endl;
ui->leBugRepPersInfoName->setValidator( qValLineEdits );