ArmanS
22nd April 2009, 16:51
Hi All,
I have a QVBoxLayout with QWidget derived class which are overrideing sizeHint. The size policy for my widgets is Fixed. When I create a widget and insert it into my layout, the later process the widget's size correctly (i.e. it considers sizeHint). However when later the widget changes the value of its sizeHint the layout is not getting updated. I tried QWiddget::updateGeometry (for the parent widget of layout), and QLayout::update but neither one solved give an effect.
How to update the layout.
P.S. when I destroy and recreate the layout the widget sizes are shown ok, but this is very heavy operation so I don't want to go through this way.
Thnx!
I have a QVBoxLayout with QWidget derived class which are overrideing sizeHint. The size policy for my widgets is Fixed. When I create a widget and insert it into my layout, the later process the widget's size correctly (i.e. it considers sizeHint). However when later the widget changes the value of its sizeHint the layout is not getting updated. I tried QWiddget::updateGeometry (for the parent widget of layout), and QLayout::update but neither one solved give an effect.
How to update the layout.
P.S. when I destroy and recreate the layout the widget sizes are shown ok, but this is very heavy operation so I don't want to go through this way.
Thnx!