Hello,

following situation:
I have a QGraphicsScene, where the background is a large image (i.e. larger than 4000x4000 pixel).
I've tried several approaches but they are all too slow:
1. Background Pixmap is a QGraphicsPixmapItem at the z-Level -1.
2. QGraphicsScene::drawBackground(...) is used for drawing the background pixmap
3. QGraphicsView::setViewport(new QGLWidget)

Problem with 1 and 2 in scaled mode (scale=0.5): Moving the viewport with the scrollBars takes approximatly 2 seconds (I need almost smooth moving)
Problem with 3: The moving is incredible fast, but the pixmap is completely black (too large???)

I've tried also the following:
QGraphicsView::drawBackground, where I am using a pre calculated transformed pixmap:
void MyGraphicsView::drawBackground( QPainter* pPainter, const QRectF& rect )
{
if ( m_Scale == 1 ) {
QGraphicsView::drawBackground( pPainter, rect );
}
else {
pPainter->resetTransform();
QRectF visibleRect( horizontalScrollBar()->value(), verticalScrollBar()->value(), viewport()->width(), viewport()->height() );
pPainter->drawPixmap( visibleRect, m_ScaledPixmap, visibleRect );
}
}

The problem with this approach is, that the painting has an automatic clipping, and this clipping is set to the scene coordinates.

Anybody a suggestion, how I can draw a precalculated scaled pixmap in the background?