From df54a15651567e534bdb56c84e357eb2dc81d88b Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 26 Aug 2024 12:08:25 +0200 Subject: [PATCH] UITour: Fix that steps were skipped when clicking text If the mouse was released on the text, we must prevent propagation to the IntroductionWidget itself, or it handles the click again. Fixes: QTCREATORBUG-31447 Change-Id: I1e33d767e7ec3d3ead381890294016140a9952fc Reviewed-by: Alessandro Portale --- src/plugins/welcome/introductionwidget.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/welcome/introductionwidget.cpp b/src/plugins/welcome/introductionwidget.cpp index 41bd1a93bf1..d414ead37e0 100644 --- a/src/plugins/welcome/introductionwidget.cpp +++ b/src/plugins/welcome/introductionwidget.cpp @@ -157,10 +157,12 @@ bool IntroductionWidget::event(QEvent *e) bool IntroductionWidget::eventFilter(QObject *obj, QEvent *ev) { - if (obj == parent() && ev->type() == QEvent::Resize) + if (obj == parent() && ev->type() == QEvent::Resize) { resizeToParent(); - else if (obj == m_stepText && ev->type() == QEvent::MouseButtonRelease) + } else if (obj == m_stepText && ev->type() == QEvent::MouseButtonRelease) { step(); + return true; + } return QWidget::eventFilter(obj, ev); }