#include "CUITabWidget.h" #include #include #include /** * @brief CUITabWidget::CUITabWidget 构造函数 * @param conf 配置信息 * @param parent */ CUITabWidget::CUITabWidget(CUIConfig* conf, QVector &subCUI, QWidget *parent) : QTabWidget(parent) { this->conf = conf; iniUI(subCUI); } /** * @brief CUITabWidget::iniUI 根据配置信息初始化 */ void CUITabWidget::iniUI(QVector &subCUI) { for(auto conf : conf->getSub()) { CUI* subui = new CUI(nullptr, conf); subCUI.push_back(subui); this->addTab(subui->getUI(), conf->getPropertyValue("name")); } }