How to display a grid of non-uniform cells ?
-
@raven-worx
Super
QrwAndroid sounds awesome :) -
@SeeLook said in How to display a grid of non-uniform cells ?:
Maybe
Flow
can suit You?As far as I can see
Flow
doesn't work with a model likeGridview
does. -
@Curtwagner1984
And what if to squeezeRepeater
inside theFlow
? -
@SeeLook said in How to display a grid of non-uniform cells ?:
@Curtwagner1984
And what if to squeezeRepeater
inside theFlow
?I don't know.
Gridview
creates and destroys delegates as needed. If I'll put a repeater inFlow
and I have let's say 500 images, they would all have to be loaded to memory. -
Can you elaborate a bit more about how and what you did, so that I may try it too ?
-
If I were You, I might try something like this:
Flow { Repeater { model: yourData.length Image { source: yourData[index] sourceSize.height: 200 // or other fixed value } } }
If
yourData
isQStringList
or just QML array of strings, it can be directly set as a model of theRepeater
:model: yourData
and accessible inside
Image
this way:source: modelData
I hope this is some clue for You
-
@SeeLook Looks like the
model
can be aQAbstructListModel
which is exactly what I use...
It's interesting, I'll try this out.Other problems are the insert and remove function that
GridView
supports, as well as theshouldfechmore
andfetchmore
functions. (implemented inQAbstructListModel
)