From e0873308a615c7e8f78fe653fd3bb2ecf4739501 Mon Sep 17 00:00:00 2001
From: wumu <mayi@mayi.com>
Date: 星期三, 14 六月 2023 23:08:24 +0800
Subject: [PATCH] qxlsm

---
 internal_system_v1/problemnotmoney.cpp |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/internal_system_v1/problemnotmoney.cpp b/internal_system_v1/problemnotmoney.cpp
index 50539d1..21e6c3f 100644
--- a/internal_system_v1/problemnotmoney.cpp
+++ b/internal_system_v1/problemnotmoney.cpp
@@ -6,9 +6,19 @@
     ui(new Ui::ProblemNotMoney)
 {
     ui->setupUi(this);
+    ui->tableWidget->setColumnWidth(0,300);
 }
 
 ProblemNotMoney::~ProblemNotMoney()
 {
     delete ui;
 }
+
+void ProblemNotMoney::on_tableWidget_clicked(const QModelIndex &index)
+{
+    int allCnt = 0;
+    for(int i=1;i<ui->tableWidget->rowCount();++i){
+        allCnt += ui->tableWidget->item(i,2)->text().toInt();
+    }
+    ui->tableWidget->setItem(0,2,new QTableWidgetItem(QString::number(allCnt)));
+}

--
Gitblit v1.8.0