From 592390c1a8d8d5664fc34893da586412b6a1bcf3 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Tue, 1 Dec 2009 20:05:23 +0100 Subject: Do not enabled Pan gesture by default on Mac. Enabled Pan gesture makes your widget receive mouse release events while doing system gestures like two-finger scroll. Reviewed-by: Richard --- src/gui/widgets/qabstractscrollarea.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/widgets/qabstractscrollarea.cpp b/src/gui/widgets/qabstractscrollarea.cpp index 35639b7..3cf4e94 100644 --- a/src/gui/widgets/qabstractscrollarea.cpp +++ b/src/gui/widgets/qabstractscrollarea.cpp @@ -294,7 +294,9 @@ void QAbstractScrollAreaPrivate::init() q->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); q->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); layoutChildren(); +#ifndef Q_WS_MAC viewport->grabGesture(Qt::PanGesture); +#endif } #ifdef Q_WS_WIN @@ -543,7 +545,9 @@ void QAbstractScrollArea::setViewport(QWidget *widget) d->viewport->setParent(this); d->viewport->setFocusProxy(this); d->viewport->installEventFilter(d->viewportFilter.data()); +#ifndef Q_WS_MAC d->viewport->grabGesture(Qt::PanGesture); +#endif d->layoutChildren(); if (isVisible()) d->viewport->show(); -- cgit v0.12