Advice on approach needed QML GridView [SOLVED]
So basically task is to make Icon arrangement in GridView similar to the one in N9: user press and hold, the icon he pressed becomes draggable while the rest icons are faded, upon release if the icon being dragged moves to a new grid = GridView indexes are updated accordingly and the icon we dragged takes new position.
The way I see it being implemented is as follows:
-> upon press and hold (MouseArea,onPressAndHold) the MouseArea drag.active becomes true
-> then we start checking Mouse position changes
-> each Grid slot then has its center position Mouse coordinates
-> Upon dragged icon released if released mouse coordinates are in proximity of such Grid slot center position => we change index of dragged icon to the index of the icon which was previously occupying that slot
So question is - is that optimal??
Sorry - SOLVED of course...