regExp("[a-zA-Z0-9_-]");
[\\w-_]*[.][\\w]{,3}
QLineEdit *m_ip = ...;m_ip->setInputMask( "000.000.000.000;0" );QRegExp rx( "\\b(([01]?\\d?\\d|2[0-4]\\d|25[0-5])\\.){3}([01]?\\d?\\d|2[0-4]\\d|25[0-5])\\b" );m_ip->setValidator( new QRegExpValidator( rx, this ) );