You might have run into a bug that was recently fixed; try applying this patch and see if it helps...
--- qgraphicsview.cpp 2007/02/05 13:30:58.000000000
+++ qgraphicsview.cpp 2007/02/12 16:26:20.000000000
@@ -338,6 +338,14 @@
int height = maxSize.height();
QRectF viewRect
= matrix.
mapRect(q
->sceneRect
());
+ // Adjust the maximum width and height of the viewport based on the width
+ // of visible scrollbars.
+ int scrollBarExtent
= q
->style
()->pixelMetric
(QStyle::PM_ScrollBarExtent,
0, q
);
+ if (viewRect.width() >= maxSize.width())
+ height -= scrollBarExtent;
+ if (viewRect.height() >= maxSize.height())
+ width -= scrollBarExtent;
+
// Setting the ranges of these scroll bars can/will cause the values to
// change, and scrollContentsBy() will be called correspondingly. This
// will reset the last center point.
--- qgraphicsview.cpp 2007/02/05 13:30:58.000000000
+++ qgraphicsview.cpp 2007/02/12 16:26:20.000000000
@@ -338,6 +338,14 @@
int height = maxSize.height();
QRectF viewRect = matrix.mapRect(q->sceneRect());
+ // Adjust the maximum width and height of the viewport based on the width
+ // of visible scrollbars.
+ int scrollBarExtent = q->style()->pixelMetric(QStyle::PM_ScrollBarExtent, 0, q);
+ if (viewRect.width() >= maxSize.width())
+ height -= scrollBarExtent;
+ if (viewRect.height() >= maxSize.height())
+ width -= scrollBarExtent;
+
// Setting the ranges of these scroll bars can/will cause the values to
// change, and scrollContentsBy() will be called correspondingly. This
// will reset the last center point.
To copy to clipboard, switch view to plain text mode
Bookmarks