summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qabstractscrollarea.cpp
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2009-11-12 05:34:21 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2009-11-12 05:34:21 (GMT)
commit05c1b075f757afcc87748ac6758277eb5c0d8e17 (patch)
tree9f3159998e643ccd96313c94fb5eac2782aa3aab /src/gui/widgets/qabstractscrollarea.cpp
parent87845845cd5b44bc4ad391ad5ae8499f3850acb3 (diff)
parentdb3ae6188c8f88f25b4f8e2645e76a7c6fffef18 (diff)
downloadQt-05c1b075f757afcc87748ac6758277eb5c0d8e17.zip
Qt-05c1b075f757afcc87748ac6758277eb5c0d8e17.tar.gz
Qt-05c1b075f757afcc87748ac6758277eb5c0d8e17.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/gui/widgets/qabstractscrollarea.cpp')
-rw-r--r--src/gui/widgets/qabstractscrollarea.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/gui/widgets/qabstractscrollarea.cpp b/src/gui/widgets/qabstractscrollarea.cpp
index 7d81d5a..b0d0baf 100644
--- a/src/gui/widgets/qabstractscrollarea.cpp
+++ b/src/gui/widgets/qabstractscrollarea.cpp
@@ -51,6 +51,7 @@
#include "qdebug.h"
#include "qboxlayout.h"
#include "qpainter.h"
+#include "qmargins.h"
#include "qabstractscrollarea_p.h"
#include <qwidget.h>
@@ -868,6 +869,22 @@ void QAbstractScrollArea::setViewportMargins(int left, int top, int right, int b
}
/*!
+ \since 4.6
+ Sets \a margins around the scrolling area. This is useful for
+ applications such as spreadsheets with "locked" rows and columns.
+ The marginal space is is left blank; put widgets in the unused
+ area.
+
+ By default all margins are zero.
+
+*/
+void QAbstractScrollArea::setViewportMargins(const QMargins &margins)
+{
+ setViewportMargins(margins.left(), margins.top(),
+ margins.right(), margins.bottom());
+}
+
+/*!
\fn bool QAbstractScrollArea::event(QEvent *event)
\reimp
@@ -946,7 +963,7 @@ bool QAbstractScrollArea::event(QEvent *e)
if (g) {
QScrollBar *hBar = horizontalScrollBar();
QScrollBar *vBar = verticalScrollBar();
- QPointF delta = g->lastOffset();
+ QPointF delta = g->delta();
if (!delta.isNull()) {
if (QApplication::isRightToLeft())
delta.rx() *= -1;