zhuzichu520 / FluentUI

FluentUI for QML
MIT License
3.16k stars 422 forks source link

FluTableView删除元素时会出现奇怪的警告 #418

Closed liaozhangsheng closed 5 months ago

liaozhangsheng commented 5 months ago

如图,删除元素时(具体删除到哪个元素会告警我也不太确定)会出现如下警告:

[Warning][FluTableView.qml:68][140293751508352]:qrc:/qt/qml/FluentUI/Controls/FluTableView.qml:68:5: QML TableModel: getRow(): "rowIndex" xxx is greater than or equal to rowCount() of xxx
[Warning][FluTableView.qml:265][140293751508352]:qrc:/qt/qml/FluentUI/Controls/FluTableView.qml:265: TypeError: Value is undefined and could not be converted to an object

image

zhuzichu520 commented 5 months ago

已修改,奇奇怪怪的问题,明明最后一条数据删掉了,却还能收到信号去更新布局。。然后就会出现找不到这个数据的警告。...... https://github.com/zhuzichu520/FluentUI/commit/190b14eed6194677dcaa43e25a52a1c47bb94498

liaozhangsheng commented 5 months ago

已修改,奇奇怪怪的问题,明明最后一条数据删掉了,却还能收到信号去更新布局。。然后就会出现找不到这个数据的警告。...... 190b14e

好像还有一个问题,删完表格的最后一个元素也会报警告:

qrc:/qt/qml/FluentUI/Controls/FluTableView.qml:69:5: QML TableModel: getRow(): "rowIndex" 0 is greater than or equal to rowCount() of 0
qrc:/qt/qml/FluentUI/Controls/FluTableView.qml:630: TypeError: Value is undefined and could not be converted to an object
zhuzichu520 commented 5 months ago

已处理~再试试 https://github.com/zhuzichu520/FluentUI/commit/9bc5794db889687490d5dc3228e4be4ad86e7f75