title: PySide Qt: Auto vertical growth for TextEdit Widget, and spacing between widgets in a vertical layout
body: <p><img src="https://i.stack.imgur.com/PgiSJ.png" alt="enter image description here"></p>
  
  <p>I need to Solve two problems With my widget above.</p>
  
  <ol>
  <li>I'd like to be able to define the amount of space put between the post widgets shown in the image (they look fine as is, but I wanna know it's done). </li>
  <li>I'd like to grow the text edits vertically based on the amount of text they contain without growing horizontally.</li>
  </ol>
  
  <p>For 1 the code that populates the widgets is as follows : </p>
  
  <pre><code>self._body_frame = QWidget()
  self._body_frame.setMinimumWidth(750)
  self._body_layout = QVBoxLayout()
  self._body_layout.setSpacing(0)
  self._post_widgets = []
  for i in range(self._posts_per_page):
      pw = PostWidget()
      self._post_widgets.append(pw)
      self._body_layout.addWidget(pw)
  
      self._body_frame.setLayout(self._body_layout)
  </code></pre>
  
  <p>SetSpacing(0) doesn't bring things any closer, however  SetSpacing(100) does increase it.</p>
  
  <p><strong>edit</strong></p>
  
  <p>(for Question 2) I haven't mentioned this, but I want the parent widget to have a vertical scrollbar.</p>
  
  <p>I have answered my own question, but its wordy, and cause and affect based. A proper well written tutorial style answer to address both points gets the bounty :D </p>
  
  <p><strong>edit 2</strong></p>
  
  <p>Using my own answer below I have solved the problem. I'll be accepting my own answer now.</p>
  
  <p><img src="https://i.stack.imgur.com/q5kjL.png" alt="enter image description here"></p>