PDA

View Full Version : icon glitch in QListView



trhaynes
31st August 2009, 19:07
I have a QListView set up to use icons:

self.setAttribute(Qt.WA_MacShowFocusRect, False)
self.setViewMode(QListView.IconMode)
self.setFlow(QListView.LeftToRight)
self.setSpacing(5)
self.setResizeMode(QListView.Adjust)
self.setWrapping(True)

(I'm using PyQt but that shouldn't matter I don't think).

When I rename one of these items, I see something like this: http://imagebin.org/61886. In the screenshot I have renamed "material copy" to "mat." It stays like this until I click around a little bit. I know that calling reset() would fix it, but that would also reset my scroll position. Is there a less drastic way of dealing with this?

Thanks.

wysota
31st August 2009, 19:48
Could you prepare a minimal compilable example reproducing the problem? What Qt version do you use?