From 10457ff67b999e9cc99624801c635e7f25e0d5ef Mon Sep 17 00:00:00 2001 From: wumu <mayi@mayi.com> Date: 星期四, 31 八月 2023 23:36:05 +0800 Subject: [PATCH] 0831 --- internal_system_v1/clientmainwindow.cpp | 34 +++++++++++++++++++++++++++++++++- 1 files changed, 33 insertions(+), 1 deletions(-) diff --git a/internal_system_v1/clientmainwindow.cpp b/internal_system_v1/clientmainwindow.cpp index 442b832..1d290f3 100644 --- a/internal_system_v1/clientmainwindow.cpp +++ b/internal_system_v1/clientmainwindow.cpp @@ -1,6 +1,7 @@ #include "clientmainwindow.h" #include "ui_clientmainwindow.h" #include <QDebug> +#include <QFileDialog> ClientMainWindow::ClientMainWindow(QWidget *parent) : QMainWindow(parent), @@ -18,6 +19,12 @@ void ClientMainWindow::initUi() { + m_searchInfo = new SearchInfo(this); + ui->tabWidget->addTab(m_searchInfo,"淇℃伅鏌ヨ"); + + m_coverInfo = new CoverInfo(this); + m_coverInfo->setParent(ui->tab); + m_auditPro = new AuditProject(this); m_auditworkload = new AuditWorkload(this); m_problemMon = new ProblemMoney(this); @@ -37,6 +44,14 @@ ui->stackedWidget->addWidget(m_caseClue); ui->stackedWidget->setCurrentIndex(0); + +// m_searchInfo = new SearchInfo(this); +// ui->tabWidget->addTab(m_searchInfo,"淇℃伅鏌ヨ"); + +// m_coverInfo = new CoverInfo(this); +// m_coverInfo->setParent(ui->tab); + + } void ClientMainWindow::on_pushButton_auditPro_clicked() @@ -87,7 +102,7 @@ doc.write("A1","鐮佽殎杞欢"); doc.mergeCells("A1:A4"); doc.mergeCells("B1:C1"); - if(doc.saveAs("test.xlsx")) + if(doc.saveAs("Data/test.xlsx")) { qDebug()<<"save is ok"; }else{ @@ -95,3 +110,20 @@ } } + +void ClientMainWindow::on_pushButton_2_clicked() +{ + QXlsx::Document doc("test.xlsx"); + qDebug()<<doc.read("A1"); + qDebug()<<doc.read("B1"); + qDebug()<<doc.read("C1"); +} + +void ClientMainWindow::on_pushButton_openXlsxFile_clicked() +{ + QStringList files = QFileDialog::getOpenFileNames(this,"鎵撳紑鐢靛瓙鏂囨。","./","*.xlsx *.xls"); + qDebug()<<"files:"<<files; + for(auto f:files){ + ui->listWidget->addItem(f); + } +} -- Gitblit v1.8.0