From b1d46a3cbd6dd70a6ec7e31d2d11056a5f5c6d91 Mon Sep 17 00:00:00 2001 From: Akseli Lahtinen Date: Fri, 13 Jun 2025 13:46:40 +0300 Subject: [PATCH] AnimatedHeightWidget: Disable scrollbars QScrollArea is used to avoid increasing view width, and not for actual scroll reasons. We should therefore disallow scrolling the view entirely, since this causes bugs with being able to scroll random views. BUG: 504252 --- src/animatedheightwidget.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/animatedheightwidget.cpp b/src/animatedheightwidget.cpp index f1631bb6f..cd62f3971 100644 --- a/src/animatedheightwidget.cpp +++ b/src/animatedheightwidget.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include AnimatedHeightWidget::AnimatedHeightWidget(QWidget *parent) @@ -30,6 +31,9 @@ AnimatedHeightWidget::AnimatedHeightWidget(QWidget *parent) m_contentsContainerParent->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); m_contentsContainerParent->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); m_contentsContainerParent->setWidgetResizable(true); + // Disables manual scrolling, for example with mouse scrollwheel. + m_contentsContainerParent->verticalScrollBar()->setEnabled(false); + m_contentsContainerParent->horizontalScrollBar()->setEnabled(false); setMinimumWidth(0); } -- 2.47.3