ListView with flow layout
-
What is currently the best way to make ListView with flow layout? (Qt 5.3.X)
Is it possible to achieve it by some particular setting of orientation and layoutDirection?I know that I could achieve this without ListView with Repeater:
@Flow {
Repeater {
model: myModel
MyDelegate {
}
}
}@But I will have potentially big amount of items, so ListView seems a better idea.
BTW my model subclasses QAbstractListModel. -
It seems that I have to answer myself.
What I want can be done with GridView with default property values. I'm just not yet sure if this is efficient.
-
So I'm trying this in a GridView, where I show previews of photos (Image element in delegate). I'm testing on a set of 433 photos. My test application with GridView consumes 1.5 GB directly after start.
Which is weird, because QAbstractItemModel::data() in my model is called only for a couple of first items after start (then again when GridView is scrolled).