Sets this line edit to only accept input that the validator, v, will accept. This allows you to place any arbitrary constraints on the text which may be entered.
If v == 0, setValidator() removes the current input validator. The initial setting is to have no input validator (i.e. any input is accepted up to maxLength()).
Definition at line 539 of file qlineedit.cpp.
Referenced by QAbstractSpinBox::setLineEdit().
d->validator = const_cast<QValidator*>(v);