View Full Version : hide/show screen update problem

4th February 2006, 14:39
Hi, In a main window I have an image and an information window beside the image all in a HBoxlayout . I want to make an option in my program that let the user hide/show the information screen. So if the information is hidden, the image has more space to be shown. The problem is that if I call to show or hide functions of the information screen and after I want to know the new size of the window that contains the image, its size has not been updated yet. I want to know when the layout is updated after calling show or hide of one of its widgets. I have tried calling repaint or update of the main window but no results. Thanks.

5th February 2006, 04:25
You shouldn't need such information... All you need is to set a proper size policy (expanding probably) for a widget holding your image and if the layout changes, the widget will get a resize event and you can intercept it and do whatever you need there.

6th February 2006, 17:49
That's exactly what I did to solve the problem. Thanks