From 4847c47cab93e9a6fba6df16f289213d35ba4126 Mon Sep 17 00:00:00 2001 From: mzh Date: Sat, 2 Nov 2024 16:22:13 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E6=B7=BB=E5=8A=A0radiogroup=E8=83=BD?= =?UTF-8?q?=E5=A4=9F=E6=A0=B9=E6=8D=AE=E5=BD=93=E5=89=8Dorigin=E7=9A=84?= =?UTF-8?q?=E5=80=BC=E8=AE=BE=E7=BD=AE=E9=80=89=E4=B8=AD=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CFDStruct/CUIProperty/CUIComponentRadioGroup.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CFDStruct/CUIProperty/CUIComponentRadioGroup.cpp b/CFDStruct/CUIProperty/CUIComponentRadioGroup.cpp index 98608e6..4bb52da 100644 --- a/CFDStruct/CUIProperty/CUIComponentRadioGroup.cpp +++ b/CFDStruct/CUIProperty/CUIComponentRadioGroup.cpp @@ -33,6 +33,12 @@ void CUIComponentRadioGroup::iniUI(QVector &subCUI) mainLayout->addWidget(m_Component); } this->setLayout(mainLayout); + + QVariant vOrigin = m_conf->getPropertyOriginValue("value_origin"); + int *ptr = qvariant_cast(vOrigin); + if (ptr != nullptr) { + m_ButtonGroup->button(*ptr)->setChecked(true); + } } void CUIComponentRadioGroup::iniUI_GroupBox()