qt - finding a specific element of a ListModel based on its properties in QtQuick 2.0 -
i have listmodel objectid role (integer , unique). want query model find other properties of element specific objectid. how can that?
you can loop other model retrieve each element 1 one searching objectid
for(var = 0; < mymodel.count; i++) { var elemcur = mymodel.get(i); if(searchedid == elemcur.objectid) { console.log("found @ index : ", i); } }
Comments
Post a Comment