qml怎么获取TableView中被点击的tab item

2024-11-29 13:42:21
推荐回答(1个)
回答(1):

Connections{ target: tvItem; onCurrentIndexChanged: { console.log(tvItem.currentIndex+" is clicked!"+tvItem.currentTab); changed(tvItem.currentIndex);
} }
当onCurrentIndexChanged时获取CurrentIndex,然后用信号绑定目标发出