diff options
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/qabstractscrollarea.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/qplaintextedit.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/qplaintextedit_p.h | 1 | ||||
-rw-r--r-- | src/gui/widgets/qtextedit.cpp | 2 |
4 files changed, 5 insertions, 8 deletions
diff --git a/src/gui/widgets/qabstractscrollarea.cpp b/src/gui/widgets/qabstractscrollarea.cpp index 770e769..6de7c10 100644 --- a/src/gui/widgets/qabstractscrollarea.cpp +++ b/src/gui/widgets/qabstractscrollarea.cpp @@ -54,6 +54,7 @@ #ifdef Q_WS_WIN #include "qstandardgestures.h" +#include <private/qstandardgestures_p.h> #endif #include "qabstractscrollarea_p.h" @@ -299,8 +300,11 @@ void QAbstractScrollAreaPrivate::init() layoutChildren(); #ifdef Q_WS_WIN - panGesture = new QPanGesture(viewport); + panGesture = new QPanGesture(viewport, q); + panGesture->d_func()->implicitGesture = true; + QObject::connect(panGesture, SIGNAL(started()), q, SLOT(_q_gestureTriggered())); QObject::connect(panGesture, SIGNAL(triggered()), q, SLOT(_q_gestureTriggered())); + QObject::connect(panGesture, SIGNAL(finished()), q, SLOT(_q_gestureTriggered())); #endif // Q_WS_WIN } diff --git a/src/gui/widgets/qplaintextedit.cpp b/src/gui/widgets/qplaintextedit.cpp index c79e482..085341c 100644 --- a/src/gui/widgets/qplaintextedit.cpp +++ b/src/gui/widgets/qplaintextedit.cpp @@ -794,10 +794,6 @@ void QPlainTextEditPrivate::init(const QString &txt) viewport->setCursor(Qt::IBeamCursor); #endif originalOffsetY = 0; -#ifdef Q_WS_WIN - panGesture = new QPanGesture(q); - QObject::connect(panGesture, SIGNAL(triggered()), q, SLOT(_q_gestureTriggered())); -#endif } void QPlainTextEditPrivate::_q_repaintContents(const QRectF &contentsRect) diff --git a/src/gui/widgets/qplaintextedit_p.h b/src/gui/widgets/qplaintextedit_p.h index 7ff0c03..cda1d92 100644 --- a/src/gui/widgets/qplaintextedit_p.h +++ b/src/gui/widgets/qplaintextedit_p.h @@ -182,7 +182,6 @@ public: #ifdef Q_WS_WIN void _q_gestureTriggered(); - QPanGesture *panGesture; #endif }; diff --git a/src/gui/widgets/qtextedit.cpp b/src/gui/widgets/qtextedit.cpp index 547a4fb..cc79464 100644 --- a/src/gui/widgets/qtextedit.cpp +++ b/src/gui/widgets/qtextedit.cpp @@ -67,8 +67,6 @@ #include <qtexttable.h> #include <qvariant.h> -#include <qstandardgestures.h> - #include <qinputcontext.h> #endif |