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

Popular posts from this blog

matlab - Deleting rows with specific rules -

jquery - How would i go about shortening this code? And to cancel the previous click on click of new section? -