QToolBar *pToolBar = new QToolBar; QToolButton *pMenuBtn = new QToolButton;
pMenuBtn->setText(tr("Menu")); QMenu *pMenu = new QMenu;
pMenu->addAction(tr("Qt"));
pMenu->addAction(tr("Linux"));
pMenu->addAction(tr("FreeOS")); pMenuBtn->setMenu(pMenu);
pToolBar->addWidget(pMenuBtn);