Resizing qt widgets when their children are hidden

Posted by laura on Stack Overflow See other posts from Stack Overflow or by laura
Published on 2010-03-18T10:54:52Z Indexed on 2010/06/11 5:42 UTC
Read the original article Hit count: 256

Filed under:
|
|

I have the situation in the following image:

alt text

How would I go about resizing the widget when the retry child is hidden so that it looks as in the first image? The main layout is a QVBoxLayout, the retry child is a widget with a QVBoxLayout as well.

I've tried the following:

  • update()
  • updateGeometry()
  • setGeometry(childrenRect())
  • layout()->activate()

on the main widget as soon as I've set the retry widget to hidden. Do I need to intercept some event to do this?

© Stack Overflow or respective owner

Related posts about qt

Related posts about resize