From 788ef20247c90d52fd983ba79a53e2522f61a3b6 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 4 Apr 2019 14:03:30 +0200 Subject: [PATCH] JSON Wizards: Give labels more space even when word-wrapped QLabel has a horizontal size policy of "Preferred", but if the label is word-wrapped, the sizeHint is a using a golden ratio for width & height, but we want the label to grab as much horizontal space as it gets anyhow. Change-Id: I6ed049f4f23158014dc04f2d5020b7c2dd4c1980 Reviewed-by: Christian Kandeler --- src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp b/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp index d99f5fe0ec1..8048d4cc6df 100644 --- a/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp +++ b/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp @@ -388,6 +388,7 @@ QWidget *LabelField::createWidget(const QString &displayName, JsonFieldPage *pag auto w = new QLabel; w->setWordWrap(m_wordWrap); w->setText(m_text); + w->setSizePolicy(QSizePolicy::Expanding, w->sizePolicy().verticalPolicy()); return w; }