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

void QTreeView::updateGeometries (  )  [protected, virtual, inherited]

Updates the items in the tree view.

For internal use only.

Reimplemented from QAbstractItemView.

Definition at line 1484 of file qtreeview.cpp.

References QSize::height(), QAbstractScrollArea::horizontalScrollBar(), QMetaObject::invokeMethod(), QAbstractItemView::model(), QAbstractScrollArea::setViewportMargins(), and QAbstractItemView::updateGeometries().

Referenced by QTreeView::collapse(), QTreeView::columnCountChanged(), QTreeView::expand(), QTreeView::mouseDoubleClickEvent(), QTreeView::mousePressEvent(), QTreeView::moveCursor(), and QTreeView::timerEvent().

{
    Q_D(QTreeView);
    QSize hint = d->header->isHidden() ? QSize(0, 0) : d->header->sizeHint();
    setViewportMargins(0, hint.height(), 0, 0);

    QRect vg = d->viewport->geometry();
    QRect geometryRect(vg.left(), vg.top() - hint.height(), vg.width(), hint.height());
    d->header->setGeometry(geometryRect);
    d->header->setOffset(horizontalScrollBar()->value());
    if (d->header->isHidden())
        QMetaObject::invokeMethod(d->header, "updateGeometries");

    if (model()) {
        d->updateVerticalScrollbar();
        d->updateHorizontalScrollbar();
    }

    QAbstractItemView::updateGeometries();
}


Generated by  Doxygen 1.6.0   Back to index