Quantcast
Channel: Active questions tagged qtquick2 - Stack Overflow
Viewing all articles
Browse latest Browse all 107

How to use nested Repeaters in QML

$
0
0
Row {     Rectangle { width: 10; height: 20; color: "red" }     Repeater {         model: 10         Rectangle { width: 20; height: 20; radius: 10; color: "green" }     }     Rectangle { width: 10; height: 20; color: "blue" }}

Here, I want the color of each middle rectangle to be selected from a list. i.e., each color has to be different rather than all being green.

Do I need nested repeaters? How should I go about this?


Code snippet from: Qt Documentation — Repeater QML Type.


Viewing all articles
Browse latest Browse all 107

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>