PDA

View Full Version : QRegExp: too big for character



ucomesdag
15th March 2007, 18:15
QRegExp rx("[\x0020-\x007F|\x2190|\x2192]{1,16}");
QValidator *validator = new QRegExpValidator(rx, this);I would like to add (QChar)0x2192 and (QChar)0x2190 but I get "too big for character" compile error's.

jacek
15th March 2007, 19:17
How about:
QRegExp rx( QString::fromUtf8( "[\x20-\x7F\xe2\x86\x92\xe2\x86\x90]{1,16}" ) );
QValidator *validator = new QRegExpValidator(rx, this);?

ucomesdag
15th March 2007, 19:52
How about:
QRegExp rx( QString::fromUtf8( "[\x20-\x7F\xe2\x86\x92\xe2\x86\x90]{1,16}" ) );
QValidator *validator = new QRegExpValidator(rx, this);?

I love you! thanks made my day!!!