From 64dea33250dffc24c3a439c961e46577aeb48690 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Sun, 30 Jan 2022 23:15:37 +0100 Subject: [PATCH] Welcome: Fix scrolling in the sidebar Some items did not move when the sidebar got scrolled. This change assigns them the right parent widget, so that they also scroll correctly. Fixes: QTCREATORBUG-26956 Change-Id: I28c131ffaa867652a4d9e282566f7986a0df9383 Reviewed-by: Cristian Adam --- src/plugins/welcome/welcomeplugin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/welcome/welcomeplugin.cpp b/src/plugins/welcome/welcomeplugin.cpp index 5299f36f6ce..ef4c969be66 100644 --- a/src/plugins/welcome/welcomeplugin.cpp +++ b/src/plugins/welcome/welcomeplugin.cpp @@ -288,7 +288,7 @@ public: newVBox->setSpacing(buttonSpacing / 3); vbox->addItem(newVBox); - auto newLabel = new QLabel(tr("New to Qt?"), this); + auto newLabel = new QLabel(tr("New to Qt?"), mainWidget); newLabel->setFont(brandFont()); newLabel->setAlignment(Qt::AlignHCenter); newVBox->addWidget(newLabel); @@ -461,7 +461,7 @@ void WelcomeMode::addPage(IWelcomePage *page) if (m_pluginList.at(idx)->priority() >= pagePriority) break; } - auto pageButton = new WelcomePageButton(m_sideArea); + auto pageButton = new WelcomePageButton(m_sideArea->widget()); auto pageId = page->id(); pageButton->setText(page->title()); pageButton->setActiveChecker([this, pageId] { return m_activePage == pageId; });