diff options
author | Stephan Binner <stephan.binner@basyskom.com> | 2017-02-28 20:24:27 +0100 |
---|---|---|
committer | Stephan Binner <stephan.binner@basyskom.com> | 2017-03-01 19:41:49 +0000 |
commit | e1b9ddc10552b061ef8b4d56a2e3fa7a5daa61bb (patch) | |
tree | 6e06ba5925f1ca27e18662be9954b91f1795c25b /src/widgets/styles/qpixmapstyle.cpp | |
parent | b41492d53e733e12351338e03ad471d39d81c0b1 (diff) |
Add feature.scroller
Change-Id: I5313e1f5091d5764994525dae138e288e5125c59
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/widgets/styles/qpixmapstyle.cpp')
-rw-r--r-- | src/widgets/styles/qpixmapstyle.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/widgets/styles/qpixmapstyle.cpp b/src/widgets/styles/qpixmapstyle.cpp index a947f5d079..3aec3cf991 100644 --- a/src/widgets/styles/qpixmapstyle.cpp +++ b/src/widgets/styles/qpixmapstyle.cpp @@ -60,7 +60,9 @@ #include <QAbstractScrollArea> #include <QScrollBar> +#if QT_CONFIG(scroller) #include <qscroller.h> +#endif QT_BEGIN_NAMESPACE @@ -194,7 +196,7 @@ void QPixmapStyle::polish(QWidget *widget) view->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel); } #endif -#if QT_CONFIG(gestures) +#if QT_CONFIG(gestures) && QT_CONFIG(scroller) QScroller::grabGesture(scrollArea->viewport(), QScroller::LeftMouseButtonGesture); #endif } @@ -235,7 +237,7 @@ void QPixmapStyle::unpolish(QWidget *widget) if (qstrcmp(widget->metaObject()->className(),"QComboBoxPrivateContainer") == 0) widget->removeEventFilter(this); -#if QT_CONFIG(gestures) && QT_CONFIG(scrollarea) +#if QT_CONFIG(gestures) && QT_CONFIG(scrollarea) && QT_CONFIG(scroller) if (QAbstractScrollArea *scrollArea = qobject_cast<QAbstractScrollArea*>(widget)) QScroller::ungrabGesture(scrollArea->viewport()); #endif |