View Single Post
nicolai's Avatar
Posts: 1,637 | Thanked: 4,424 times | Joined on Apr 2009 @ Germany
#147
Originally Posted by Berserk View Post


I think you need to make it this way:
Code:
QRegExp regexer("^\\#[0-9a-fA-F]{6,6}$");
^ = from the start of the string
(.. your characters ..)
$ = until the end of the string
No. From the Qt-Doc about QtRegExpValidator:
... The match is made against the entire string, e.g. if the regexp is [A-Fa-f0-9]+ it will be treated as ^[A-Fa-f0-9]+$.