From 8c937cad48e60db1489a94c70060fcdc8a80876e Mon Sep 17 00:00:00 2001 From: simonyan <315082291@qq.com> Date: Thu, 31 Oct 2024 18:07:28 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E8=AE=BE=E7=BD=AElayout=E5=86=85?= =?UTF-8?q?=E5=85=83=E7=B4=A0=E7=9A=84=E9=97=B4=E9=9A=94=EF=BC=8C=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E7=95=8C=E9=9D=A2=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CFDStruct/CUIProperty/CUIComponentBaseContainerWidget.cpp | 4 +++- CFDStruct/CUIProperty/CUIComponentBaseWidget.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CFDStruct/CUIProperty/CUIComponentBaseContainerWidget.cpp b/CFDStruct/CUIProperty/CUIComponentBaseContainerWidget.cpp index af25780..23a26a2 100644 --- a/CFDStruct/CUIProperty/CUIComponentBaseContainerWidget.cpp +++ b/CFDStruct/CUIProperty/CUIComponentBaseContainerWidget.cpp @@ -20,7 +20,9 @@ QLayout *CUIComponentBaseContainerWidget::getLayout(CUIConfig *conf) } else if (layoutConf == "QVBoxLayout") { layout = new QHBoxLayout; } else { - layout = new QHBoxLayout; + layout = new QVBoxLayout; } + layout->setSpacing(0); + layout->setMargin(0); return layout; } diff --git a/CFDStruct/CUIProperty/CUIComponentBaseWidget.cpp b/CFDStruct/CUIProperty/CUIComponentBaseWidget.cpp index bb78e09..fe94ba7 100644 --- a/CFDStruct/CUIProperty/CUIComponentBaseWidget.cpp +++ b/CFDStruct/CUIProperty/CUIComponentBaseWidget.cpp @@ -20,7 +20,9 @@ QLayout *CUIComponentBaseWidget::getLayout(CUIConfig *conf) } else if (layoutConf == "QVBoxLayout") { layout = new QHBoxLayout; } else { - layout = new QHBoxLayout; + layout = new QVBoxLayout; } + layout->setSpacing(0); + layout->setMargin(0); return layout; }