UIGQMenuBar
菜单条控件
派生关系
class UIGQMenuBar : public QMenuBar, public IUIGQControlBase
主要方法
1、设置菜单条的背景
void setItemBackground(UIGQtLib::CtrlState state, const FillStyle& fillRes);
2、设置文字样式
void setTextStyle(UIGQtLib::CtrlState state, const TextStyleDesc& textStyle);
3、向菜单条中添加菜单项目
QAction* addMenu(QMenu *menu);
UIGQMenuBar* pMenuBar = new UIGQMenuBar(pBasicControls);
pMenuBar->setGeometry(150, offsetTop, 500, 45);
UIGQMenu* pMenu = createMenu();
pMenu->setIconOffset(20);
pMenu->addAction(icon, "item1");
pMenu->addAction(icon, "item2");
pMenu->addAction(icon, "item3");
pMenu->addAction(icon, "item4");
pMenuBar->addMenu(pMenu);