QLineEdit限制输入范围为0-255
QRegExp regx("^[0-9]$|^[0-9]{2}$|^[1][0-9]{2}$|^[2][0-4][0-9]$|^[2][5][0-5]$");
ui.FreLine->setValidator(new QRegExpValidator(regx));
QRegExp regx("^[0-9]$|^[0-9]{2}$|^[1][0-9]{2}$|^[2][0-4][0-9]$|^[2][5][0-5]$");
ui.FreLine->setValidator(new QRegExpValidator(regx));