On Sun, Aug 7, 2011 at 2:06 PM, Artem Marchenko <[email protected]> wrote: > Hi Shaun > There's just a mistake in math when calculating x for the rectangles after > the one being clicked. > Change index * (width + view.spacing) - (width/2) to index * (width + > view.spacing) - (width/2) - view.spacing
While you are correct in that minor gap, that wasn't what I was referring to actually. It doesn't help that the wiki article doesn't provide a scenario where it works incorrectly, and I can't manage to whip one up that does it in pure qml. > See full code with coordinates printed at http://pastebin.com/QpzJ3uYE > In general though I don't think it's a good idea to mix List or Row with > manual coordinate calculation - it's too easy to miss yet another automatic > "help" from positioners. What would you suggest to get the effect I desire? I really don't care through which method through which it is obtained, I just want it to work ;). > If you want to set coordinates manually anyway, why > not to put them to rectangle and use Repeater for adding them from the model As mentioned, I did that (created a repeater, put it in a row, made it use the model). When it's in a row and the model's contents changes, it acts pretty buggy in the sense that it will tend to flick to a different index, then back to the original when the data changes. When it isn't in a row, it works fine. That doesn't make much sense to me.. If I wanted to use a repeater without any layouting of any kind, how could I position the collection of items wherever I want? Since apparently I can't use anchors with it, as that causes the issues. -- Shaun Reich, KDE Software Developer (kde.org) _______________________________________________ Qt-qml mailing list [email protected] http://lists.qt.nokia.com/mailman/listinfo/qt-qml
