"Add Library" wizard: Fix display glitch

Fixes: QTCREATORBUG-23049
Change-Id: Ic7e694707e6e0565866b86838f1302719a933854
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Christian Kandeler
2019-10-22 17:36:32 +02:00
parent 30b37a989a
commit a4863bd238

View File

@@ -30,9 +30,10 @@
#include <utils/hostosinfo.h> #include <utils/hostosinfo.h>
#include <utils/fileutils.h> #include <utils/fileutils.h>
#include <QVBoxLayout>
#include <QRadioButton>
#include <QLabel> #include <QLabel>
#include <QRadioButton>
#include <QScrollArea>
#include <QVBoxLayout>
#include <QFileInfo> #include <QFileInfo>
#include <QTextStream> #include <QTextStream>
@@ -268,11 +269,18 @@ SummaryPage::SummaryPage(AddLibraryWizard *parent)
setFinalPage(true); setFinalPage(true);
auto *layout = new QVBoxLayout(this); 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_summaryLabel = new QLabel(this);
m_snippetLabel = new QLabel(this); m_snippetLabel = new QLabel(this);
m_snippetLabel->setWordWrap(true); m_snippetLabel->setWordWrap(true);
layout->addWidget(m_summaryLabel); 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_summaryLabel->setTextFormat(Qt::RichText);
m_snippetLabel->setTextFormat(Qt::RichText); m_snippetLabel->setTextFormat(Qt::RichText);
m_snippetLabel->setTextInteractionFlags(Qt::TextBrowserInteraction); m_snippetLabel->setTextInteractionFlags(Qt::TextBrowserInteraction);