This commit is contained in:
朱子楚\zhuzi
2023-06-26 19:59:28 +08:00
parent d741b3eb4f
commit 0610f63f26
4 changed files with 40 additions and 5 deletions

View File

@ -12,7 +12,7 @@ endif()
set(QML_PLUGIN_DIRECTORY ${CMAKE_PREFIX_PATH}/qml/FluentUI)
#设置版本号
add_definitions(-DVERSION=1,3,6,1)
add_definitions(-DVERSION=1,3,6,2)
find_package(Qt6 REQUIRED COMPONENTS Core Quick Qml)

View File

@ -23,7 +23,6 @@ Rectangle {
})
table_model.columns = columns
header_model.columns = columns
console.debug(JSON.stringify(header_rows))
d.header_rows = [header_rows]
}
}
@ -110,11 +109,16 @@ Rectangle {
delegate: Rectangle {
required property bool selected
required property bool current
property var readOnly: columnSource[column].readOnly
color: selected ? FluTheme.primaryColor.lightest: (row%2!==0) ? control.color : (FluTheme.dark ? Qt.rgba(1,1,1,0.06) : Qt.rgba(0,0,0,0.06))
implicitHeight: 40
implicitWidth: columnSource[column].width
TapHandler{
acceptedButtons: Qt.LeftButton
onDoubleTapped: {
if(readOnly){
return
}
item_loader.sourceComponent = obtEditDelegate(column,row)
var index = table_view.index(row,column)
}
@ -354,4 +358,8 @@ Rectangle {
item_loader.sourceComponent = null
}
function resetPosition(){
table_view.positionViewAtCell(Qt.point(0, 0),TableView.AlignTop|TableView.AlignLeft)
}
}