diff options
-rw-r--r-- | src/quicktemplates2/qquickpopup.cpp | 10 | ||||
-rw-r--r-- | src/quicktemplates2/qquickpopup_p.h | 2 | ||||
-rw-r--r-- | src/quicktemplates2/qquickpopupitem.cpp | 12 | ||||
-rw-r--r-- | src/quicktemplates2/qquickpopupitem_p_p.h | 2 |
4 files changed, 26 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickpopup.cpp b/src/quicktemplates2/qquickpopup.cpp index f4751261..915cf8f8 100644 --- a/src/quicktemplates2/qquickpopup.cpp +++ b/src/quicktemplates2/qquickpopup.cpp @@ -1852,6 +1852,16 @@ bool QQuickPopup::overlayEvent(QQuickItem *item, QEvent *event) } } +void QQuickPopup::touchEvent(QTouchEvent *event) +{ + // TODO: QQuickPopup and QQuickDrawer still rely on synthesized mouse events + event->ignore(); +} + +void QQuickPopup::touchUngrabEvent() +{ +} + #if QT_CONFIG(wheelevent) void QQuickPopup::wheelEvent(QWheelEvent *event) { diff --git a/src/quicktemplates2/qquickpopup_p.h b/src/quicktemplates2/qquickpopup_p.h index d1b0dfac..8d311e4a 100644 --- a/src/quicktemplates2/qquickpopup_p.h +++ b/src/quicktemplates2/qquickpopup_p.h @@ -351,6 +351,8 @@ protected: virtual void mouseDoubleClickEvent(QMouseEvent *event); virtual void mouseUngrabEvent(); virtual bool overlayEvent(QQuickItem *item, QEvent *event); + virtual void touchEvent(QTouchEvent *event); + virtual void touchUngrabEvent(); #if QT_CONFIG(wheelevent) virtual void wheelEvent(QWheelEvent *event); #endif diff --git a/src/quicktemplates2/qquickpopupitem.cpp b/src/quicktemplates2/qquickpopupitem.cpp index 94bd7dec..abcb86aa 100644 --- a/src/quicktemplates2/qquickpopupitem.cpp +++ b/src/quicktemplates2/qquickpopupitem.cpp @@ -229,6 +229,18 @@ void QQuickPopupItem::mouseUngrabEvent() d->popup->mouseUngrabEvent(); } +void QQuickPopupItem::touchEvent(QTouchEvent *event) +{ + Q_D(QQuickPopupItem); + d->popup->touchEvent(event); +} + +void QQuickPopupItem::touchUngrabEvent() +{ + Q_D(QQuickPopupItem); + d->popup->touchUngrabEvent(); +} + #if QT_CONFIG(wheelevent) void QQuickPopupItem::wheelEvent(QWheelEvent *event) { diff --git a/src/quicktemplates2/qquickpopupitem_p_p.h b/src/quicktemplates2/qquickpopupitem_p_p.h index ef97b038..16321feb 100644 --- a/src/quicktemplates2/qquickpopupitem_p_p.h +++ b/src/quicktemplates2/qquickpopupitem_p_p.h @@ -79,6 +79,8 @@ protected: void mouseReleaseEvent(QMouseEvent *event) override; void mouseDoubleClickEvent(QMouseEvent *event) override; void mouseUngrabEvent() override; + void touchEvent(QTouchEvent *event) override; + void touchUngrabEvent() override; #if QT_CONFIG(wheelevent) void wheelEvent(QWheelEvent *event) override; #endif |