>>1. I run figure() and uipanel(). The uipanel fills the screen.
>> 2. I increase the figure size. The uipanel stays the same size.
>> 3. I increase the figure size. The uipanel grows so that it would fill
>> the figure window extend set in 2., but as the figure is bigger now,
>> I get a white border on the right and bottom of the figure window.
>>I have repeated step 3 many times with always the same result. Making
>>the figure window successively smaller hides the 1px border on the right
>>and the bottom (because the uipanel is then too big to fit into the
>>figure window).
>>...
So this is consistent with what I wanted to explain: the gui thread is always "one drawnow late" and I have no idea how to fix this with the current system of (callback based) communication between the Qt figures and the interpreter. You'll have to wait until someone finds how to fix bug #44472.