From 6ea2769d53615984e57b26b63b8d56b49c472e26 Mon Sep 17 00:00:00 2001 From: wumu <mayi@mayi.com> Date: 星期三, 13 九月 2023 22:44:13 +0800 Subject: [PATCH] 0913 --- internal_system_v1/clientmainwindow.cpp | 38 +++++++++++++++++++++++++++++++++++++- 1 files changed, 37 insertions(+), 1 deletions(-) diff --git a/internal_system_v1/clientmainwindow.cpp b/internal_system_v1/clientmainwindow.cpp index 442b832..5a4c0e5 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,18 @@ 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); + + // 闅愯棌鎺夋煇涓�夐」 + ui->tabWidget->removeTab(3); // OK + + + } void ClientMainWindow::on_pushButton_auditPro_clicked() @@ -87,7 +106,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 +114,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