Hi all

I'm struggling with QListView and subclassed QStyledItemDelegate
Basically, I have QListView in left frame of my app, and there are icons with description below.
Problem is that when I resize my app icons are aligned to left, and I would like them to be aligned to center.
So this is what I did:
1. I subclassed QListView so it sends signal with new size from resizeEvent function
2. I subclassed QStyledItemDelegate and I'm painting item in paint function

Problem is:
When I resize my app, and last items from QListView goes out of visible area, Vertical scrollBar should appear, but then there is some loop, scrollbar appears and disappears in loop, QListView is blinking with scrollbar, and resizeEvent is generated for QListView, over and over again, one event with slightly lower width and next one with slightly bigger width, just as scrollbar disappears and appears.
How to avoid this loop?
When I set policy for scrollbar alwaysOn then it works as it should.

I'm developing on Linux with Qt 4.8.2

Best Regards
Marek