I would like to write an asset browser using QGraphicsView. It's a little different from examples using QGraphicsView and QGraphicsItems, because I want only one scrollbar and I want items to move automatically, when the viewport size changes. For example, when viewport width is large enough to display 4 asssets, they should be displayed like this:
aaaa
aaaa
aa
but when viewport is shrinked and can only contain 3 in a row, it should display them like this:
aaa
aaa
aaa
a
I wouldn't like to have to move those asset's by myself and let the graphics view manage them all. Is it somehow possible?
I have written once such a thing, but using QWidget and paintEvent, drawing all assets myself and keeping track of how many assets can be displayed in a row. Can it be done simpler with QGraphicsView?