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

bool QTextDocument::isEmpty (  )  const

Returns true if the document is empty; otherwise returns false.

Definition at line 376 of file qtextdocument.cpp.

Referenced by QTextEdit::keyPressEvent(), and QPlainTextEdit::keyPressEvent().

    Q_D(const QTextDocument);
    /* because if we're empty we still have one single paragraph as
     * one single fragment */
    return d->length() <= 1;

Generated by  Doxygen 1.6.0   Back to index