diff options
author | Lars Knoll <lars.knoll@qt.io> | 2016-08-29 10:29:47 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2016-10-11 14:20:34 +0000 |
commit | 93b78e7c6135340484569a0310ca3dedceb47f31 (patch) | |
tree | 167a7ba83989ad501cccf481dac2083aae87dcef /src/widgets/styles/qpixmapstyle.cpp | |
parent | 369857d29437615e1fda9fb1ab2f94e464d55ca2 (diff) |
Fix build with various features disabled
Change-Id: I95cb3cf3434306344af3f4c7556f45dbfa0b08d6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/widgets/styles/qpixmapstyle.cpp')
-rw-r--r-- | src/widgets/styles/qpixmapstyle.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/widgets/styles/qpixmapstyle.cpp b/src/widgets/styles/qpixmapstyle.cpp index a0fff82dc0..ee5fd704dc 100644 --- a/src/widgets/styles/qpixmapstyle.cpp +++ b/src/widgets/styles/qpixmapstyle.cpp @@ -187,7 +187,9 @@ void QPixmapStyle::polish(QWidget *widget) view->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel); view->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel); } +#if QT_CONFIG(gestures) QScroller::grabGesture(scrollArea->viewport(), QScroller::LeftMouseButtonGesture); +#endif } if (qobject_cast<QScrollBar*>(widget)) @@ -217,8 +219,10 @@ void QPixmapStyle::unpolish(QWidget *widget) if (qstrcmp(widget->metaObject()->className(),"QComboBoxPrivateContainer") == 0) widget->removeEventFilter(this); +#if QT_CONFIG(gestures) if (QAbstractScrollArea *scrollArea = qobject_cast<QAbstractScrollArea*>(widget)) QScroller::ungrabGesture(scrollArea->viewport()); +#endif QCommonStyle::unpolish(widget); } |