From 2e08efe58fda93c96659a8bcf2efa84655ca2c4c Mon Sep 17 00:00:00 2001
From: 杭振泉 <123445659@qq.com>
Date: 星期一, 18 五月 2026 10:11:30 +0800
Subject: [PATCH] 查看已激活人数优化

---
 mainwindow.cpp |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/mainwindow.cpp b/mainwindow.cpp
index 20f1060..b393b92 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -5,6 +5,7 @@
 #include <QClipboard>
 #include <QDateTime>
 #include <QDebug>
+#include <QDesktopServices>
 #include <QFileDialog>
 #include <QMessageBox>
 #include <QProcess>
@@ -775,9 +776,13 @@
 void MainWindow::on_pushButton_viewUsers_clicked()
 {
     QString excelPath = QApplication::applicationDirPath();
-    QString filename = QFileDialog::getOpenFileName(nullptr,tr("鎵撳紑鏂囦欢"),excelPath,tr("excel鏂囦欢(*.xlsx)"));
-    if(filename=="")
-    {
-        return;
-    }
+//    QString filename = QFileDialog::getOpenFileName(nullptr,tr("鎵撳紑鏂囦欢"),excelPath,tr("excel鏂囦欢(*.xlsx)"));
+//    if(filename=="")
+//    {
+//        return;
+//    }
+    QUrl fileUrl = QUrl::fromLocalFile(excelPath);
+
+    // 2. 璋冪敤绯荤粺鏈嶅姟鎵撳紑鏂囦欢绠$悊鍣ㄥ苟閫変腑鏂囦欢
+    QDesktopServices::openUrl(fileUrl);
 }

--
Gitblit v1.9.1