Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

reclaiming space from hidden widgets



  • Hi all -

    I've got a simple UI in which I'd like to hide something (the lower box in the pic) and reclaim that space (so the upper box can use it). I know how to hide widgets, but the space is still saved for the lower box in this case. Is this a matter of size policy?

    Thanks...

    widget.png


  • Lifetime Qt Champion

    Hi
    Yes could be size policy but also depends on
    what type of Layout as the Box one is a bit special with that.
    Also if you have multiple layouts etc.



  • @mrjj the layout was a QHBoxLayout, and it contained a QVBoxLayout. I tried several things, but couldn't get it to work. No big deal; I just deleted it. Thanks for looking at it.


Log in to reply