diff options
author | Morten Engvoldsen <morten.engvoldsen@nokia.com> | 2009-11-09 12:03:20 (GMT) |
---|---|---|
committer | Morten Engvoldsen <morten.engvoldsen@nokia.com> | 2009-11-09 12:03:20 (GMT) |
commit | cf417f787454f131f35248bb0c1294dadd777b45 (patch) | |
tree | e5ad2f54887aa695c6f66ae2c305ab75ccabdac0 /src/gui/widgets/qabstractscrollarea.cpp | |
parent | a7577f8c3ae3a025384d8d19fdf3575ef141a70b (diff) | |
parent | e07878a9bcccbf063650272329c0aca14290b8e3 (diff) | |
download | Qt-cf417f787454f131f35248bb0c1294dadd777b45.zip Qt-cf417f787454f131f35248bb0c1294dadd777b45.tar.gz Qt-cf417f787454f131f35248bb0c1294dadd777b45.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'src/gui/widgets/qabstractscrollarea.cpp')
-rw-r--r-- | src/gui/widgets/qabstractscrollarea.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gui/widgets/qabstractscrollarea.cpp b/src/gui/widgets/qabstractscrollarea.cpp index 7d81d5a..48099ef 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 |