1.connect(ui->menu_2, SIGNAL(triggered(QAction*)), this, SLOT(ActionCollectOnceTrigger(QAction*)));
这个信号槽连接可以知道菜单点击的是哪个action
2.connect(ui->actionImport, SIGNAL(triggered()), this, SLOT(BatchImport()));
点击菜单中action 触发事件
3.connect(ui->tableWidget, SIGNAL(itemSelectionChanged()), this, SLOT(showSelectedListItem()));
tableWidget某一记录被选择
4.connect(ui->BatImport, SIGNAL(clicked()), this, SLOT(unknownMaterialImport()));
点击触发事件
5.connect(ui->tableWidget1->horizontalHeader(), SIGNAL(sectionClicked(int)), this, SLOT(mySort(int)));
tableWidget表头选中触发函数
6.connect(ui->tableWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(rightClickAddLeftDown(QPoint)));
右击tableWidget 某行 出现菜单栏
因篇幅问题不能全部显示,请点此查看更多更全内容