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

void QLineEdit::clear (  )  [slot]

Clears the contents of the line edit.

See also:
setText(), insert()

Definition at line 1337 of file qlineedit.cpp.

References QWidget::resetInputContext().

Referenced by AddressBook::addContact(), Q3FileDialog::detailViewSelectionChanged(), Calculator::digitClicked(), event(), FindDialog::findClicked(), CodeStylePage::initializePage(), inputMethodEvent(), keyPressEvent(), Q3FileDialog::listBoxSelectionChanged(), paste(), AddressBook::previous(), AddressBook::submitContact(), AddressBook::updateInterface(), and Window::validatorChanged().

{
    Q_D(QLineEdit);
    int priorState = d->undoState;
    resetInputContext();
    d->selstart = 0;
    d->selend = d->text.length();
    d->removeSelectedText();
    d->separate();
    d->finishChange(priorState, /*update*/false, /*edited*/false);
}


Generated by  Doxygen 1.6.0   Back to index