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

qreal QTextDocument::idealWidth (  )  const

Since:
4.2
Returns the ideal width of the text document. The ideal width is the actually used width of the document without optional alignments taken into account. It is always <= size().width().

See also:
adjustSize(), textWidth

Definition at line 626 of file qtextdocument.cpp.

References documentLayout(), and textWidth.

Referenced by adjustSize().

{
    if (QTextDocumentLayout *lout = qobject_cast<QTextDocumentLayout *>(documentLayout()))
        return lout->idealWidth();
    return textWidth();
}


Generated by  Doxygen 1.6.0   Back to index