| | |
| | | ui->setupUi(this); |
| | | m_menu = nullptr; |
| | | //initUi(); |
| | | readInfo(); // 加载表格 |
| | | //readInfo(); // 加载表格 |
| | | addMenu(); // 增加菜单 |
| | | |
| | | // 自适应处理 |
| | |
| | | it4->setCheckState(0,Qt::Checked); |
| | | |
| | | // 复选框状态处理 |
| | | connect(ui->treeWidget,QOverload<QTreeWidgetItem*,int>::of(QTreeWidget::itemClicked),this,[=](QTreeWidgetItem* it,int index){ |
| | | connect(ui->treeWidget,QOverload<QTreeWidgetItem*,int>::of(&QTreeWidget::itemClicked),this,[=](QTreeWidgetItem* it,int index){ |
| | | qDebug()<<it<<index; |
| | | if(it == top1){ |
| | | qDebug()<<"点击了码蚁集团"; |
| | |
| | | it.next(); |
| | | list.append(it.fileInfo().absoluteFilePath()); |
| | | } |
| | | int allSize = list.size(); |
| | | float cntIdx=1.0; |
| | | foreach(QString str, list) |
| | | { |
| | | qDebug() << str; |
| | | int index = str.indexOf("内审统01表"); |
| | | qDebug()<<"index:"<<index; |
| | | |
| | | |
| | | if(index > 0){ |
| | | QAxObject excel("ket.Application"); |
| | | if(!excel.setControl("ket" |
| | |
| | | |
| | | qDebug()<<"单位信息数量:"<<m_nameAndComInfos.size(); |
| | | } |
| | | |
| | | // 控制显示进度相关 |
| | | emit loadProgress((cntIdx/allSize)*100); |
| | | cntIdx++; |
| | | } |
| | | |
| | | createTreeNode(); // 构建树形节点 |
| | | |
| | | // 发射 加载完成的信号 |
| | | emit loadFinished(); |
| | | |
| | | // QAxObject excel("./debug/Data/附件2_内审统01表_单位及内部审计机构基本情况表-1.301版(1).xls"); |
| | | // excel.setProperty("Visible",true); |
| | |
| | | readExcelFromPath(path); |
| | | } |
| | | } |
| | | |
| | | void ConverInfo2::showExcelSlot() |
| | | { |
| | | readInfo(); // 加载表格 |
| | | } |