| | |
| | | top1->setCheckState(0,Qt::Checked); |
| | | it4->setCheckState(0,Qt::Checked); |
| | | |
| | | // 复选框状态处理 |
| | | connect(ui->treeWidget,QOverload<QTreeWidgetItem*,int>::of(QTreeWidget::itemClicked),this,[=](QTreeWidgetItem* it,int index){ |
| | | qDebug()<<it<<index; |
| | | if(it == top1){ |
| | | qDebug()<<"点击了码蚁集团"; |
| | | for(int i=0;i<top1->childCount();++i){ |
| | | top1->child(i)->setCheckState(0,top1->checkState(0)); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | // 设置菜单:添加单位、删除单位 |
| | | m_menu = new QMenu(this); |
| | | m_menu->addAction("删除"); |
| | |
| | | connect(m_menu->actions().at(0),SIGNAL(triggered(bool)),this,SLOT(deleteInfo())); |
| | | connect(m_menu->actions().at(1),SIGNAL(triggered(bool)),this,SLOT(addInfo())); |
| | | // 单位内容修改 |
| | | |
| | | // 右边可编辑内容 |
| | | //ui->scrollArea->setWidget(ui->frame); |
| | | } |
| | | |
| | | void ConverInfo2::showMenu(QPoint p) |