kongxz |
2015-12-04 11:00 |
IP地址控件问题
QRegExp regexp("^(((?:25[0-5])|(?:2[0-4]\\d)|([0-9])|(?:1\\d{2})|(?:[1-9]\\d{1}))\\.){3}((?:25[0-5])|(?:2[0-4]\\d)|([0-9])|(?:1\\d{2})|(?:[1-9]\\d{1}))$"); QRegExpValidator * qrev = new QRegExpValidator(regexp, this); ui.m_LineEdit->setValidator(qrev); ui.m_LineEdit->setInputMask("000.000.000.000;");
当把SetInputMask函数放最前面的时候m_LineEdit没法输入了,放在最后面的时候QRegExpValidator又没了效果,有什么好的解决办法吗?
|
|