C++ (Qt)QLineEdit::setValidator(QRegExpValidator("\\d+"));
C++ (Qt)QLineEdit::setValidator(new QRegExpValidator("\\d+"));