diff --git a/src/plugins/qmakeprojectmanager/addlibrarywizard.cpp b/src/plugins/qmakeprojectmanager/addlibrarywizard.cpp index 998a33fdddc..34553567b94 100644 --- a/src/plugins/qmakeprojectmanager/addlibrarywizard.cpp +++ b/src/plugins/qmakeprojectmanager/addlibrarywizard.cpp @@ -30,9 +30,10 @@ #include #include -#include -#include #include +#include +#include +#include #include #include @@ -268,11 +269,18 @@ SummaryPage::SummaryPage(AddLibraryWizard *parent) setFinalPage(true); auto *layout = new QVBoxLayout(this); + const auto scrollArea = new QScrollArea; + const auto snippetWidget = new QWidget; + const auto snippetLayout = new QVBoxLayout(snippetWidget); m_summaryLabel = new QLabel(this); m_snippetLabel = new QLabel(this); m_snippetLabel->setWordWrap(true); layout->addWidget(m_summaryLabel); - layout->addWidget(m_snippetLabel); + snippetLayout->addWidget(m_snippetLabel); + snippetLayout->addStretch(1); + scrollArea->setWidget(snippetWidget); + scrollArea->setWidgetResizable(true); + layout->addWidget(scrollArea); m_summaryLabel->setTextFormat(Qt::RichText); m_snippetLabel->setTextFormat(Qt::RichText); m_snippetLabel->setTextInteractionFlags(Qt::TextBrowserInteraction);