#include "CUICommon.h" #include #include #include #include #include #include //CUICommon::CUICommon() //{ //} /** * @brief CUICommon::appLayout 自动提取layout配置信息,根据设置返回layout * @param conf 配置信息 * @return layout的引用 */ QLayout* CUICommon::appLayout(CUIConfig* conf) { QLayout* res_layout; // QString confLayout = conf->property["layout"]; QString confLayout = conf->getPropertyValue("layout"); if(confLayout == "QVBoxLayout") res_layout = new QVBoxLayout; else if (confLayout == "QHBoxLayout") { res_layout = new QHBoxLayout; }else { res_layout = new QVBoxLayout; } return res_layout; }