Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Grid behavior when there are too many items?

$
0
0
I’m just trying to fully understand the Grid positioner. The docs explain that when you set the number of rows and don’t have enough * items you’ll get zero width items. It’s strangely silent on what happens when you have too many*. As a test I created 10 rectangles and put them in a 3×3 grid and the first nine showed up. Fine, it looked at first like the extra items just aren’t shown. Then I added a repeater and left one of the rectangles       Grid{             columns: 3             rows : 3               Repeater{                 model : 9                   Image{                     source :"balloon.jpg"                     width : 50                     height : 50                 }             }               Rect50{                 color : "darkviolet"             }         } To my surprise, I have eight visible balloon images. The first cell of the grid has my last rectangle. Is having more items than a grid can hold simply undefined behavior or is this a bug?

Viewing all articles
Browse latest Browse all 4972

Trending Articles