From 37101c97c56ad934edefd1e7a761343e75c8a98d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E5=AD=90=E6=A5=9A=5Czhuzi?= Date: Sat, 23 Mar 2024 22:17:03 +0800 Subject: [PATCH] update --- example/CMakeLists.txt | 6 +++++- src/Qt5/imports/FluentUI/Controls/FluTableView.qml | 5 +---- src/Qt6/imports/FluentUI/Controls/FluTableView.qml | 11 ++++------- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 861a5c7d..ebbeca9f 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.20) -project(example VERSION 1.0 LANGUAGES CXX) +project(example VERSION 1.0) #配置通用编译 set(CMAKE_CXX_STANDARD 17) @@ -49,9 +49,13 @@ configure_file( ) #遍历所有Cpp文件 + +message("---------->${filename}") file(GLOB_RECURSE CPP_FILES *.cpp *.h) foreach(filepath ${CPP_FILES}) string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" filename ${filepath}) + + message(${filename}) list(APPEND sources_files ${filename}) endforeach(filepath) diff --git a/src/Qt5/imports/FluentUI/Controls/FluTableView.qml b/src/Qt5/imports/FluentUI/Controls/FluTableView.qml index b06c2c68..6b1b63e9 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluTableView.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluTableView.qml @@ -192,10 +192,7 @@ Rectangle { property var rowObject : control.getRow(row) property var itemModel: model property bool editVisible: { - if(d.editPosition === undefined){ - return false - } - if(d.editPosition._key === rowObject._key && d.editPosition.column === column){ + if(rowObject && d.editPosition && d.editPosition._key === rowObject._key && d.editPosition.column === column){ return true } return false diff --git a/src/Qt6/imports/FluentUI/Controls/FluTableView.qml b/src/Qt6/imports/FluentUI/Controls/FluTableView.qml index f2160281..affa37f1 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluTableView.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluTableView.qml @@ -193,10 +193,7 @@ Rectangle { property var rowObject : control.getRow(row) property var itemModel: model property bool editVisible: { - if(d.editPosition === undefined){ - return false - } - if(d.editPosition._key === rowObject._key && d.editPosition.column === column){ + if(rowObject && d.editPosition && d.editPosition._key === rowObject._key && d.editPosition.column === column){ return true } return false @@ -383,7 +380,7 @@ Rectangle { model: table_sort_model clip: true onRowsChanged: { - closeEditor() + control.closeEditor() } delegate: com_table_delegate FluLoader{ @@ -496,7 +493,7 @@ Rectangle { } onClicked: (event)=>{ - closeEditor() + control.closeEditor() } } FluLoader{ @@ -627,7 +624,7 @@ Rectangle { } onClicked: (event)=>{ - closeEditor() + control.closeEditor() } } MouseArea{