나는 GridView로 swipeView를 가지고 있습니다. 내 모델 수를 기반으로 Gridview를 동적으로 생성합니다. (각 gridView는 maximun 6 셀만 보유합니다 .즉, 모델 수가 7 인 경우 마지막 항목과 함께 두 번째 gridView가 생성됩니다). 잘 작동합니다.동적으로로드하는 GridView는 이전 데이터를 표시합니다.
나는 문제에 직면하고있다 : 를 두 번째 항목에 스크롤, 두 번째보기는 두 번째의 GridView에로드 된 데이터까지 같은 첫 번째보기의 내용을 표시하는 동안 나는이 개있는 GridViews이있는 경우. 내 코드는 무엇입니까? 내 코드에 문제가 있습니까? 또는 어떻게 문제를 해결할 수 있습니까?
SwipeView {
id: home_Swipe
width: 1280
height: 542
x:145
y:0
// favouriteapp is model Id
Repeater{
model:Math.ceil(favouriteapp.count /6)
Component {
id: contactDelegate
QuadTiles{
id: gridItem
btn1_icon.source:favouriteapp.get(nIndex).icon1
btn3_icon.source:favouriteapp.get(nIndex).icon2
Connections{
target:gridItem
// Selected 1st button from the grid
onGridButton1Pressed:{
favouriteapp.setProperty(selectedItemIndex,"isLoaded",true)
}
}
}
}//Component
GridView{
id: grid
x: 0
y: 20
width: 1280
height: 542
interactive: false
cellWidth: 360
cellHeight:240
model: utilObj.getPageGridCount(favouriteapp.count,home_Swipe.currentIndex)
delegate:contactDelegate
}
} // Repeater
}// SwipeView