From 4bfbba2f55be9a65fba63045877d81c4175c610b Mon Sep 17 00:00:00 2001
From: wumu <mayi@mayi.com>
Date: 星期二, 20 二月 2024 23:43:33 +0800
Subject: [PATCH] 0220

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

diff --git a/internal_system_v1/converinfo2.cpp b/internal_system_v1/converinfo2.cpp
index 00d82a3..b93f5d6 100644
--- a/internal_system_v1/converinfo2.cpp
+++ b/internal_system_v1/converinfo2.cpp
@@ -36,6 +36,17 @@
     top1->setCheckState(0,Qt::Checked);
     it4->setCheckState(0,Qt::Checked);
 
+    // 澶嶉�夋鐘舵�佸鐞�
+    connect(ui->treeWidget,QOverload<QTreeWidgetItem*,int>::of(QTreeWidget::itemClicked),this,[=](QTreeWidgetItem* it,int index){
+        qDebug()<<it<<index;
+        if(it == top1){
+            qDebug()<<"鐐瑰嚮浜嗙爜铓侀泦鍥�";
+            for(int i=0;i<top1->childCount();++i){
+                top1->child(i)->setCheckState(0,top1->checkState(0));
+            }
+        }
+    });
+
     // 璁剧疆鑿滃崟:娣诲姞鍗曚綅銆佸垹闄ゅ崟浣�
     m_menu = new QMenu(this);
     m_menu->addAction("鍒犻櫎");
@@ -47,6 +58,9 @@
     connect(m_menu->actions().at(0),SIGNAL(triggered(bool)),this,SLOT(deleteInfo()));
     connect(m_menu->actions().at(1),SIGNAL(triggered(bool)),this,SLOT(addInfo()));
             // 鍗曚綅鍐呭淇敼
+
+    // 鍙宠竟鍙紪杈戝唴瀹�
+    //ui->scrollArea->setWidget(ui->frame);
 }
 
 void ConverInfo2::showMenu(QPoint p)
@@ -71,3 +85,8 @@
     if(m_curItem==nullptr)return;
     qDebug()<<"鍒犻櫎鍏徃淇℃伅,鑺傜偣锛�"<<m_curItem->text(0);
 }
+
+void ConverInfo2::on_treeWidget_doubleClicked(const QModelIndex &index)
+{
+    qDebug()<<"鍙屽嚮"<<index;
+}

--
Gitblit v1.8.0