title: PyQt 5: How to maintain relative widget size when expanding a window
body: <p>I'm working on a custom ui in Maya 2018 which uses PyQt5 (via PySide2 - there are some minimal differences, but it's essentially PyQt5).</p>
  
  <p>I've got a <code>QHBoxLayout</code> with two widgets in it and their sizing policies are both set to 'expanding'.  I set the minimum width of one of them to be about twice as wide as the other.</p>
  
  <p>Whenever I expand the window, the smaller widget expands until it's the same size as the larger one (which doesn't change size at all)... and <em>then</em> they both continue to expand at the same rate - both taking up half of the window.</p>
  
  <p>I would prefer they maintain their sizes relative to each other throughout the whole expansion.  </p>
  
  <p>Is there a way to do this that I'm just completely overlooking?</p>
  
  <p>Here's some simplified code I whipped up to reproduce the issue:</p>
  
  <pre><code>import PySide2.QtWidgets as QtWidgets
  
  class TestDialog(QtWidgets.QDialog):
      def __init__(self, *args, **kwargs):
          QtWidgets.QDialog.__init__(self, *args, **kwargs)
  
          main_layout = QtWidgets.QHBoxLayout()
          self.setLayout(main_layout)
          main_layout.setContentsMargins(5, 5, 5, 5)
          main_layout.setSpacing(5)
  
          w1 = QtWidgets.QPushButton('small')
          w2 = QtWidgets.QPushButton('large')
          w1.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
          w2.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
          w2.setMinimumWidth(250)
  
          main_layout.addWidget(w1)
          main_layout.addWidget(w2)
  
          self.setMinimumWidth(450)
          self.setMinimumHeight(100)
          self.resize(450, 100)
  
  
  test = TestDialog()
  test.show()
  </code></pre>