Anyone know how to trigger a refresh/repaint on a tablewidget?
Background: I made a thumbnail window using a tablewidget. A seperate thread creates the thumbnails. The tablewidget’s paint event loads the thumbnails (if they exist) for the current visible area of the table.
To show new thumbnails in the table right after they have been created I have to repaint the table so the paint event can load the thumbnails. This works pretty fine, except the way I trigger the paint event is quite a hack.
I’ve tried update(), repaint(), setUpdatedEnable(True) and some other things but no success.
Right now I do the following: I chose a transparent pen and then toggle the grid style of the tablewidget. This always seems to trigger a repaint. It’s quite fast and works super nice. Except it’s bugging me that it’s a hack. Anyone know a better way?