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

void QTextEdit::setDocument ( QTextDocument document ) [inherited]

Makes document the new document of the text editor.

Note:
The editor {does not take ownership of the document} unless it is the document's parent object. The parent object of the provided document remains the owner of the object.

If the current document is a child of the text editor, then it is deleted.

See also:
document()

Definition at line 768 of file qtextedit.cpp.

{
    Q_D(QTextEdit);
    d->control->setDocument(document);
    d->updateDefaultTextOption();
    d->relayoutDocument();
}

Generated by  Doxygen 1.6.0   Back to index