title: Is there anyway to add a widget and set its geometry on a qvboxlayout?
body: <p>When a qboxlayout is created, any widget added to it would in its layout, and I create a widget and set its geomoetry, then add to the widget, the geometry doesn't work.
  This is code:</p>
  <pre><code>QVBoxLayout *layout = new QVBoxLayout(centralWidget);
  QWidget *widget1 = new QWidget();
  QWidget *widget2 = new QWidget();
  layout-&gt;addWidget(widget1);
  layout-&gt;addWidget(widget2);
  QWidget *widget3 = new QWidget();
  widget3-&gt;setGeometry(0, 0, 100, 100);
  layout-&gt;addWidget(widget3); 
  </code></pre>
  <p>This is what I want to realize
  <img src="https://i.stack.imgur.com/TNUUk.png" alt="enter image description here" /></p>