杭振泉
2026-05-18 2e08efe58fda93c96659a8bcf2efa84655ca2c4c
查看已激活人数优化
1个文件已修改
15 ■■■■■ 已修改文件
mainwindow.cpp 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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);
}