QT 中的ip正则表达式

Ip的正则表达式:

QRegExp regIp("((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])[\.]){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])");

lineEidt->setValidator(new QRegExpValidator(regIp,this));

猜你喜欢

转载自blog.51cto.com/sysq2012cto/2554800