QAction * test;
test = new QAction(QIcon("Resources/add.png"),tr("添加按钮(&B)"), this);
test->setShortcut(tr("Ctrl+B"));
test->setStatusTip(tr("添加一个新的按钮"));
ui.toolButton_1->addAction(test);
connect(ui.toolButton_1, SIGNAL(triggered(test)), this, SLOT(excuteAction(test)));
执行后 槽好像并没有起作用,高手帮忙看下。
[ 此贴被XChinux在2007-08-15 17:00重新编辑 ]