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

void QGraphicsView::resizeEvent ( QResizeEvent event  )  [protected, virtual, inherited]

Reimplemented from QAbstractScrollArea.

Reimplemented in MainWindow.

Definition at line 3172 of file qgraphicsview.cpp.

References QAbstractScrollArea::resizeEvent().

Referenced by MainWindow::resizeEvent().

{
    Q_D(QGraphicsView);
    // Save the last center point - the resize may scroll the view, which
    // changes the center point.
    QPointF oldLastCenterPoint = d->lastCenterPoint;

    QAbstractScrollArea::resizeEvent(event);
    d->recalculateContentSize();

    // Restore the center point again.
    if (d->resizeAnchor == NoAnchor && !d->keepLastCenterPoint) {
        d->updateLastCenterPoint();
    } else {
        d->lastCenterPoint = oldLastCenterPoint;
    }
    d->centerView(d->resizeAnchor);
    d->keepLastCenterPoint = false;

    if (d->cacheMode & CacheBackground) {
        // Invalidate the background pixmap
        d->mustResizeBackgroundPixmap = true;
    }
}


Generated by  Doxygen 1.6.0   Back to index