title: How to allow a QWidget to expand to an entire tab within a QTabWidget?
body: <p>I've never been too great when it comes to layouts and size policies, so this is likely a simple answer, but here goes.</p>
  
  <p>When I add a new tab to a QTabWIdget, and set the widget to a QSplitter, the splitter will use the entire amount of space given. However, when I put a QSplitter within a QWidget, and add a tab using the QWidget, it will not use the give space - only what the splitter size is. </p>
  
  <p>I would like to stay away from a QLayout, as I have all necessary widgets within splitters. Just getting my QWidget to use all space in the tab (which should allow the QSplitter to use all space in the QWIdget) is what I need.</p>
  
  <p>I've built a sample below showing the comparison, as well as the result. Long question short - how can I get scenario one (within "Tab One") to appear like scenario two ("Tab Two") and still use a parent QWidget for the Spliiter?</p>
  
  <pre><code>ui-&gt;setupUi(this);
  QTabWidget* pTab = new QTabWidget(this);
  this-&gt;setCentralWidget(pTab);
  
  //Splitter belongs to a QWidget, which belongs to the Tab. Does not use all space
  QWidget* pWidget = new QWidget(this);
  QSplitter* pSplitter = new QSplitter(pWidget);
  
  QListWidget* pList = new QListWidget(this);
  QListWidget* pList2 = new QListWidget(this);
  pSplitter-&gt;addWidget(pList);
  pSplitter-&gt;addWidget(pList2);
  pTab-&gt;addTab(pWidget, "Tab One");
  
  //Splitter belongs to the Tab. Uses all space
  QListWidget* pList3 = new QListWidget(this);
  QListWidget* pList4 = new QListWidget(this);
  
  QSplitter* pSplitter2 = new QSplitter(this);
  pSplitter2-&gt;addWidget(pList3);
  pSplitter2-&gt;addWidget(pList4);
  pTab-&gt;addTab(pSplitter2, "Tab Two");
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/GmfFZ.png" alt="End result"></p>