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

QPointF QPlainTextEdit::contentOffset (  )  const [protected]

Returns the content's origin in viewport coordinates.

The origin of the content of a plain text edit is always the top left corner of the first visible text block. The content offset is different from (0,0) when the text has been scrolled horizontally, or when the first visible block has been scrolled partially off the screen, i.e. the visible text does not start with the first line of the first visible block, or when the first visible block is the very first block and the editor displays a margin.

See also:
firstVisibleBlock(), horizontalScrollBar(), verticalScrollBar()

Definition at line 2849 of file qplaintextedit.cpp.

Referenced by paintEvent().

{
    Q_D(const QPlainTextEdit);
    return QPointF(-d->horizontalOffset(), -d->verticalOffset());
}


Generated by  Doxygen 1.6.0   Back to index