From 22dd01ef61e11433f070505519b2cecb14f1694c Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Mon, 15 Jun 2020 21:11:41 +0200 Subject: [PATCH] DetailsWidget: Don't allow the summary label to expand too much The summary label must not be able to make the DetailsWidget grow horizontally. Task-number: QTCREATORBUG-24136 Change-Id: If71b007c02ad1bbcdd4f2e3bf083dfce24a14787 Reviewed-by: Eike Ziller --- src/libs/utils/detailswidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/utils/detailswidget.cpp b/src/libs/utils/detailswidget.cpp index 06159b101e1..062320846d7 100644 --- a/src/libs/utils/detailswidget.cpp +++ b/src/libs/utils/detailswidget.cpp @@ -110,9 +110,9 @@ DetailsWidgetPrivate::DetailsWidgetPrivate(QWidget *parent) : summaryLayout->addWidget(m_summaryLabelIcon); m_summaryLabel->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::LinksAccessibleByMouse); - m_summaryLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum); + m_summaryLabel->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Minimum); m_summaryLabel->setContentsMargins(0, 0, 0, 0); - summaryLayout->addWidget(m_summaryLabel); + summaryLayout->addWidget(m_summaryLabel, 1); m_summaryCheckBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum); m_summaryCheckBox->setAttribute(Qt::WA_LayoutUsesWidgetRect); /* broken layout on mac otherwise */