[Interest] QML id

Igor Mironchik igor.mironchik at gmail.com
Mon Apr 11 12:14:25 CEST 2016



On 11.04.2016 12:57, Gian Maxera wrote:
> If the Text is inside the generated rectangle into the repeater you 
> don’t need to generate different Ids, you can do that:
>
> Repeater {
>   model: 10
>   delegate: Rectangle {
>      id: cellRect
>      Text {
>         anchor.horizontalCenter: cellRect.horizontalCenter
>      }
>   }
> }
>
> Even if the delegate has a fixed id and generated 10 times, QML will 
> resolve correctly it.

I want to rewrite my QML with chess board with Repeater. And I want to 
see the next:

Chess
>
> Ciao,
> Gianluca.
>
>      }
>
>> On 11 Apr 2016, at 10:49, Igor Mironchik <igor.mironchik at gmail.com 
>> <mailto:igor.mironchik at gmail.com>> wrote:
>>
>> Look. I want to generate chess board - rectangles (8x8). And I want 
>> to place numbers an letters on the sides. This numbers and letters 
>> should be anchored to centers of rectangles. I.e. I want to have 
>> something like:
>>
>> Text {
>>    anchor.horizontalCenter: cell00.horizontalCenter
>> }
>>
>> ...
>>
>> On 11.04.2016 12:40, Gian Maxera wrote:
>>> Hello,
>>> I don’t think so.
>>> Why do you need it ? Maybe we can suggest to you an alternative 
>>> solution.
>>>
>>> Ciao,
>>> Gianluca.
>>>
>>>
>>>> On 11 Apr 2016, at 10:38, Igor Mironchik <igor.mironchik at gmail.com 
>>>> <mailto:igor.mironchik at gmail.com>> wrote:
>>>>
>>>> Hello,
>>>>
>>>> Is it possible to generate id of item in Repeater, for example?
>>>>
>>>> Thank you.
>>>> _______________________________________________
>>>> Interest mailing list
>>>> Interest at qt-project.org <mailto: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/20160411/3d82e983/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: chess.png
Type: image/png
Size: 20604 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160411/3d82e983/attachment.png>


More information about the Interest mailing list