title: Qt: "Expanding" doesn't work inside a layout
body: <p>My purpose is to create a scrollable control with a QVBoxLayout inside of it that has various controls (say buttons) on it. That control is put on a *.ui form. In the constructor for that control I write the following code:</p>
  
  <pre><code>    MyScrollArea::MyScrollArea(QWidget *parent) :
          QScrollArea(parent)
      {
          // create the scrollable container
  
          this-&gt;container = new QWidget();  // container widget member
          this-&gt;container-&gt;setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
          this-&gt;container-&gt;setContentsMargins(QMargins(0,0,0,0));
  
          this-&gt;content = new QVBoxLayout(); // layout member
          this-&gt;content-&gt;setMargin(0);
          this-&gt;content-&gt;setSpacing(0);
  
          for (int i=0; i&lt;100; i++)
          {
              QPushButton * widget = new QPushButton();
              widget-&gt;setText("button");
              widget-&gt;setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
              this-&gt;content-&gt;addWidget(widget);
          }
  
          this-&gt;container-&gt;setLayout(this-&gt;content);
          this-&gt;content-&gt;layout();
  
          this-&gt;setWidget(this-&gt;container);
     }
  </code></pre>
  
  <p>My <strong>problem</strong>: the buttons have a fixed size and <strong>do not expand horizontally</strong>. they have a fixed size. i'd like them to expand horizontally to fill the row they're in. How can I get them expanding horizontally across their parent container?</p>