How to remove item from QML GridView model
QML and Qt Quick
2
Posts
2
Posters
2.8k
Views
1
Watching
-
Hi,
I am trying to remove an item from GridView. The model class from Qt(C++) is passed to QML GridView, and I want to remove an item from model as well GridView. I am writing as@for(i = artistsModelDialog.length - 1; i >= 0; --i) {
for(j = podcastsModelDialog.length - 1; j >= 0; --j) {
if(artistsModelDialog[i].artistname === podcastsModelDialog[j].artistname) {
artistsModelDialog.remove(i);
}
}
}@I am getting error message on console :
TypeError: Result of expression 'artistsModelDialog.remove' [undefined] is not a function.
I am right? any idea?