From 20ffcfb5507daf34f81346ca3dfa4c031e7b2fe3 Mon Sep 17 00:00:00 2001
From: wumu <mayi@mayi.com>
Date: 星期日, 27 四月 2025 22:13:53 +0800
Subject: [PATCH] 0427

---
 internal_system_v1/coverinfo.cpp |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/internal_system_v1/coverinfo.cpp b/internal_system_v1/coverinfo.cpp
index c25e5a5..69f634f 100644
--- a/internal_system_v1/coverinfo.cpp
+++ b/internal_system_v1/coverinfo.cpp
@@ -1,10 +1,13 @@
-#include "coverinfo.h"
+锘�#include "coverinfo.h"
 #include "ui_coverinfo.h"
 #include <QDebug>
 #include <QDirIterator>
 #include <QFileDialog>
 #include <QSqlQuery>
 #include <QSqlRecord>
+#include "windows.h"
+
+#pragma execution_character_set("utf-8")
 
 int g_comId = 0; // 鍏ㄥ眬鍙橀噺锛屼繚瀛樺崟浣峣d
 QString g_dataRootPath; // 鏁版嵁鐨勬牴鐩綍
@@ -14,8 +17,10 @@
     ui(new Ui::CoverInfo)
 {
     ui->setupUi(this);
-    readInfo();
-    readDataFromSQL(); // 浠庢暟鎹簱璇诲彇鏁版嵁
+    CoInitializeEx(NULL, COINIT_MULTITHREADED); // 鍏堝皢COM搴撳垵濮嬪寲
+
+    //readInfo();
+    //readDataFromSQL(); // 浠庢暟鎹簱璇诲彇鏁版嵁
 
 }
 
@@ -58,6 +63,9 @@
         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;
@@ -128,6 +136,7 @@
                 }
                 if(business.size() > 0){
                     ui->label_business->setText(business);
+                    ui->label_business->setToolTip(business);
                 }else{
                     ui->label_business->setText("");
                 }

--
Gitblit v1.8.0