I'm using Qt 5.15 with C++17. I have a hierarchy of Widgets like hinted in the title:
Qt Code:
  1. MainWindow : QMainWindow
  2. ->centralWidget() = QScrollArea
  3. ->widget() = QWidget
  4. ->layout() = QVBoxLayout
  5. ->children() = [
  6. InnerWidget,
  7. InnerWidget,
  8. InnerWidget,
  9. ...
  10. ]
To copy to clipboard, switch view to plain text mode 
with
Qt Code:
  1. InnerWidget.children() = [ QLabel, QLabel ]
To copy to clipboard, switch view to plain text mode 
.
I have set
Qt Code:
  1. InnerWidget::setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum)
To copy to clipboard, switch view to plain text mode 
inside InnerWidget's constructor.

The QLabels inside InnerWidget are initialized with some QPixmap like
Qt Code:
  1. label->setPixmap(img);
  2. label->setFixedSize(img.size());
To copy to clipboard, switch view to plain text mode 
_________________


This all works fine, however now I added an option to zoom all the pixmaps to the MainWindow's menubar. I connect to a signal MainWindow::zoom_inner(.., which itself calls InnerWidget::zoom(.. on every InnerWidget, which resizes the images / labels like this:
Qt Code:
  1. auto scaled = img.scaled(img.size() * factor);
  2. label->setPixmap(scaled);
  3. label->setFixedSize(scaled.size());
To copy to clipboard, switch view to plain text mode 

Finally I update the size of the MainWindow by finding the maximum InnerWidget.frameGeometry().width() (= inner_max_width) and calling
Qt Code:
  1. void MainWindow::zoom_inner() {
  2. // ...
  3. setMaximumWidth(inner_max_width + centralWidget()->verticalScrollBar()->width() + 1);
  4. resize(maximumWidth(), size().height());
  5. }
To copy to clipboard, switch view to plain text mode 
_________________

Now after calling MainWindow::zoom(.., the window seems to resize to the correct size, as do the QLabel's inside the InnerWidget's. However, the InnerWidget's themselves do not resize at all, they just stay the same size as before and I have no idea why. I tried calling many combinations of
Qt Code:
  1. adjustSize();
  2. update();
  3. layout()->update();
  4. updateGeometry();
To copy to clipboard, switch view to plain text mode 
on any of the MainWindow,QScrollArea,InnerWidget but nothing happens.. even calling
Qt Code:
  1. InnerWidget::resize(new_size)
To copy to clipboard, switch view to plain text mode 
has no effect. Clearly InnerWidget::sizeHint() gives the correct value, because the MainWindow size after MainWindow::zoom(.. is correct. So why do the InnerWidget's refuse to resize to fit the QLabel's, even though sizePolicy is set to QSizePolicy::Minimum?

This seems like some sort of misunderstanding on my part so I'm hoping the answer is simple and doesn't need a MWE. I've tried the docs but couldn't find a solution.