ListView with flow layout
-
wrote on 18 Dec 2014, 17:18 last edited by
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. -
wrote on 19 Dec 2014, 16:01 last edited by
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.
-
wrote on 19 Dec 2014, 16:23 last edited by
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).
-
1/3