Logo Search packages:      
Sourcecode: qt4-x11 version File versions

void QLineEdit::setValidator ( const QValidator v  ) 

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()).

See also:
validator() QIntValidator QDoubleValidator QRegExpValidator

Definition at line 539 of file qlineedit.cpp.

Referenced by QAbstractSpinBox::setLineEdit().

    d->validator = const_cast<QValidator*>(v);

Generated by  Doxygen 1.6.0   Back to index