I need to resize a pyqt dialog box.

When showing the label, the window grows.

When hiding the label, the window shrinks only after two clicks.

I create a mini repo to better explain the problem:

https://github.com/marcogh/pyside2-problem