1、添加radiogroup能够根据当前origin的值设置选中按钮功能

feature/struct-menu-20241023
mzh 2 weeks ago
parent 3d421622d9
commit 4847c47cab

@ -33,6 +33,12 @@ void CUIComponentRadioGroup::iniUI(QVector<CUIPropertyWidget *> &subCUI)
mainLayout->addWidget(m_Component); mainLayout->addWidget(m_Component);
} }
this->setLayout(mainLayout); this->setLayout(mainLayout);
QVariant vOrigin = m_conf->getPropertyOriginValue("value_origin");
int *ptr = qvariant_cast<int *>(vOrigin);
if (ptr != nullptr) {
m_ButtonGroup->button(*ptr)->setChecked(true);
}
} }
void CUIComponentRadioGroup::iniUI_GroupBox() void CUIComponentRadioGroup::iniUI_GroupBox()

Loading…
Cancel
Save