message: When flow layout hasn't been visible, be conservative with its size
  * Because the flow layout adjusts to its available size, we instead set it to
  minimum size until it's first laid out. Otherwise it can get unreasonably
  sized.
diff: @@ -125,6 +125,8 @@ bool FlowLayout::hasHeightForWidth() const
  int FlowLayout::heightForWidth(int width) const
  {
  + if(m_prevRect.isEmpty())
  + return minimumSize().height();
  int height = doLayout(QRect(0, 0, width, 0), true);
  return height;
  }
  @@ -144,6 +146,8 @@ void FlowLayout::setGeometry(const QRect &rect)
  QSize FlowLayout::sizeHint() const
  {
  + if(m_prevRect.isEmpty())
  + return minimumSize();
  QSize size = geometry().size();
  size.setHeight(doLayout(geometry().adjusted(0, 0, -10, 0), true));
  return size;
  @@ -158,6 +162,8 @@ QSize FlowLayout::minimumSize() const
  size += QSize(2*margin(), 2*margin());
  + if(!m_prevRect.isEmpty())
  + {
  // we use the previous height as a hint for the minimum size otherwise we'll never request
  // enough height for multiple rows
  size.setHeight(qMax(size.height(), heightForWidth(m_prevRect.width())));
  @@ -166,6 +172,7 @@ QSize FlowLayout::minimumSize() const
  // up to a large width in our minimum, other layouts might starve us of enough height
  // because it will assume we are sized to the minimum.
  size.setWidth(qMin(size.width(), m_prevRect.width()));
  + }
  return size;
  }
  