I have a QHBoxLayout that contains many items. The last items are simple repeated many times. Since they aren't essential (additional shortcut buttons) they shouldn't be included in the minimum size of the layout. If the layout is to be made smaller those items can simply be hidden.

The default behaviour is of course to not allow resizing below the min-size of all the elements. So how can I get the layout behaviour to start hiding elements if there is no more space?