[Interest] limitation encountered when using Repeater

Robert Voinea rvoinea at gmail.com
Thu Aug 15 05:21:06 CEST 2013


Row positions elements horizontally. That is its function.
You can't adjust x, anchor left/right items inside a Row element.

Why don't you anchor your Row on left with leftMargin: 200?
 On Aug 15, 2013 3:28 AM, "Steve Pavao" <vstevenpavao at yahoo.com> wrote:

> I've come across a limitation when using Repeater.
>
> If I use a row repeater, I'm unable to successfully adjust the x origin of
> the item by modifying item.x during OnItemAdded; it has no effect on the x
> origin of the item in the repeater.
>
> Here's some sample code:
>
>       Row {
>           Repeater {
>               model: 2
>               Knob {  // a custom widget
>               }
>               onItemAdded: {
>                     if (index == 1) item.x += 200
>               }
>           }
>       }
>
>
> If it's possible to modify the x origin of the item, what's the correct
> syntax to achieve it?
>
> (BTW, I have had some success affecting the y origin of an item in a
> column repeater by modifying item.y during OnItemAdded)
>
> Thanks,
> VStevenP
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130815/703eafce/attachment.html>


More information about the Interest mailing list