Don't set WA_AcceptTouchEvents on Mac OS X.
Setting this flag causes scroll event lag, so we want to keep it off for all widgets that do not need touch events. QPanGestureRecognizer is installed on all QAbstractScrollAreas. Prevent it from setting the flag. Change-Id: Idd4fcc545ff26377607b56f75db75c2865a5fc82 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
This commit is contained in:
parent
44d415b334
commit
d576d77f03
@ -59,8 +59,8 @@ QPanGestureRecognizer::QPanGestureRecognizer()
|
||||
QGesture *QPanGestureRecognizer::create(QObject *target)
|
||||
{
|
||||
if (target && target->isWidgetType()) {
|
||||
#if defined(Q_OS_WIN) && !defined(QT_NO_NATIVE_GESTURES)
|
||||
// for scroll areas on Windows we want to use native gestures instead
|
||||
#if ((defined(Q_OS_MAC) && !defined(Q_OS_IOS)) || defined(Q_OS_WIN)) && !defined(QT_NO_NATIVE_GESTURES)
|
||||
// for scroll areas on Windows and Mac OS X we want to use native gestures instead
|
||||
if (!qobject_cast<QAbstractScrollArea *>(target->parent()))
|
||||
static_cast<QWidget *>(target)->setAttribute(Qt::WA_AcceptTouchEvents);
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user