summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/src/snippets/myscrollarea.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/src/snippets/myscrollarea.cpp b/doc/src/snippets/myscrollarea.cpp
index 93b487d..9a41ed8 100644
--- a/doc/src/snippets/myscrollarea.cpp
+++ b/doc/src/snippets/myscrollarea.cpp
@@ -98,8 +98,8 @@ void MyScrollArea::updateArea()
QSize areaSize = viewport()->size();
QSize widgetSize = widget->size();
- verticalScrollBar()->setPageStep(widgetSize.height());
- horizontalScrollBar()->setPageStep(widgetSize.width());
+ verticalScrollBar()->setPageStep(areaSize.height());
+ horizontalScrollBar()->setPageStep(areaSize.width());
verticalScrollBar()->setRange(0, widgetSize.height() - areaSize.height());
horizontalScrollBar()->setRange(0, widgetSize.width() - areaSize.width());
updateWidgetPosition();