import QtQuick 2.0 import "../com/neusoft/auto/widgets" Item { signal nameListClicked id: namelist width:230 height: 400 Image{ id:nameListBk source: "qrc:MATERIAL/MATERIAL_M8X_SUB-LIST_280_BG"+systemCtrl.style } Component { id: cmpt HMIButton{ id:namelistbtn x: 0; y: 0 btnImg:"qrc:MATERIAL/MATERIAL_M8X_SUB-LIST_256_P"+systemCtrl.style HMILabel{ id:loginname anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter text: modelData.name font.pixelSize: 20 } onClicked: { console.log("LoginAccountList.qml---->>>clicked-->>index:",index); carlinkCtrl.setNameindex(index); nameListClicked(); //namelist.visible=carlinkhome_page.isFullScreen } } } HMIListView { id: nameList width: nameListBk.width; height: nameListBk.height; model: mNameList delegate: cmpt // Refers to the delegate component focus: true highlightFollowsCurrentItem: true snapMode: ListView.SnapOneItem highlightRangeMode: ListView.StrictlyEnforceRange spacing: 2 clip: true interactive: nameList.count >4 ?true : false // less then four items , list doesn't interactive flickableDirection:Flickable.VerticalFlick scrollBar:true showBar:true scrollBar_edge:1 scrollBar_width:4 scrollBar_img:"qrc:MATERIAL/MATERIAL_M8X_SLIDER_BAR"+systemCtrl.style } Connections{ target: carlinkCtrl onNameListChanged:{ console.log("Connections--carlinkCtrl--mNameList-------->>>"); nameList.model = carlinkCtrl.getNameList(); } } }