addAction("EDIT"); QMenu *menu2 = menu_qbuttonmenu">
赞
踩
创建了一个button后:
- QMenu *menu1 = new QMenu;
- ui->pushButton->setMenu(menu1);
- QAction *action1 = menu1->addAction("FILE");
- QAction *action2 = menu1->addAction("EDIT");
- QMenu *menu2 = menu1->addMenu("USER");
- QAction *action3 = menu2->addAction("ADD");
- connect(action2,SIGNAL(triggered()),this, SLOT(showshot()));//测试下信号
未完待续……
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。