I've been working on an app that has some special behavior.

At the top level it is a frameless widget that can be shown just as a "toolbar" that is docked to the top of the users monitor when the user enters a search word in the toolbar it expands downwards to show results. The program can also "autohide" itself and be re-shown when the user mouses over it, for the autohiding I render the content widget as a pixmap, hide the real content and show a qlabel with the pixmap this way I was able to prevent the content from getting distorted and specify alignment as it animates out. In the different states the program also has a different minimum size.

From the very beginning I have had problems with the program not redrawing itself properly as it was being dynamically resized and had to implement an ugly little hack function I call refresh that invalidates layouts, calls updategeometry and repaint. In one situation i actually move the program 1px and then move it back (otherwise it just refused to redraw itself with the updated geometry)

Now I am porting my program to mac, and my "refresh" function is causing flicker
Does anybody have any advice on how I should have implemented this top level expanding / compacting widget?