| | |
| | | #include "coverinfo.h" |
| | | #include "coverinfo.h" |
| | | #include "ui_coverinfo.h" |
| | | #include <QDebug> |
| | | #include <QDirIterator> |
| | | #include <QFileDialog> |
| | | #include <QSqlQuery> |
| | | #include <QSqlRecord> |
| | | #include "windows.h" |
| | | |
| | | int g_comId = 0; // 全局变量,保存单位id |
| | | QString g_dataRootPath; // 数据的根目录 |
| | |
| | | ui(new Ui::CoverInfo) |
| | | { |
| | | ui->setupUi(this); |
| | | CoInitializeEx(NULL, COINIT_MULTITHREADED); // 先将COM库初始化 |
| | | |
| | | readInfo(); |
| | | readDataFromSQL(); // 从数据库读取数据 |
| | | |
| | |
| | | qDebug()<<"index:"<<index; |
| | | if(index > 0){ |
| | | QAxObject excel("Excel.Application"); |
| | | if(!excel.setControl("Excel.Application")){ |
| | | excel.setControl("ket.Application"); // wps内核 |
| | | } |
| | | excel.setProperty("Visible",false); |
| | | excel.setProperty("DisplayAlerts",false); |
| | | qDebug()<<"open:"<<str; |
| | |
| | | } |
| | | if(business.size() > 0){ |
| | | ui->label_business->setText(business); |
| | | ui->label_business->setToolTip(business); |
| | | }else{ |
| | | ui->label_business->setText(""); |
| | | } |