QML - How to use GridView::itemAt(real x, real y)?
-
Hi;
I can get item ofRepeaterlike this:var item = repeater.itemAt(index);But how can I get item of
GridView? I saw itemAt function. But it is different fromitemAtofRepeater. It wantsxandycoordinates but we can useindexinGridViewlikeRepeater. How can I access the item? Thanks. -
Hi;
I can get item ofRepeaterlike this:var item = repeater.itemAt(index);But how can I get item of
GridView? I saw itemAt function. But it is different fromitemAtofRepeater. It wantsxandycoordinates but we can useindexinGridViewlikeRepeater. How can I access the item? Thanks. -
@raven-worx thanks.
I solved this problem like this:gridView.currentIndex = lastIndex; var lastItem = gridView.currentItem; gridView.currentIndex = currentIndex; var currentItem = gridView.currentItem;