title: How to stretch QBoxLayout in PyQT5?
body: <p>how to stretch the QHboxLayout and QVBoxLayout in PyQT5? Which method should I use? The pictures of result are given in links (as you see when window is small it also doesn't fit in the shape of the window)</p>
  
  <pre><code>from PyQt5.QtWidgets import QApplication, QMainWindow, QTextEdit, 
  QLabel, QVBoxLayout, QHBoxLayout, QWidget, QDesktopWidget
  import sys
  
  
  class Window(QWidget):
      def __init__(self):
          super().__init__()
          self.initUI()
  
      def initUI(self):
          label1 = QLabel('Введите слова')
          words = QTextEdit()
  
          label2 = QLabel('Результат')
          result = QTextEdit()
  
          vbox1 = QVBoxLayout()
          vbox1.addStretch(1)
          vbox1.addWidget(label1)
          vbox1.addWidget(words)
  
          vbox2 = QVBoxLayout()
          vbox2.addStretch(1)
          vbox2.addWidget(label2)
          vbox2.addWidget(result)
  
          hbox = QHBoxLayout()
          hbox.addStretch(1)
          hbox.addLayout(vbox1)
          hbox.addLayout(vbox2)
          self.setLayout(hbox)
  
  
          self.setGeometry(300, 300, 500, 500)
          self.setWindowTitle('try')
          self.show()
  
  if __name__ == '__main__':
      app = QApplication(sys.argv)
      w = Window()
      sys.exit(app.exec_())
  </code></pre>
  
  <p>Small window</p>
  
  <p><img src="https://i.stack.imgur.com/P5CuB.jpg" alt=""></p>
  
  <p>Full window</p>
  
  <p><img src="https://i.stack.imgur.com/SDFV1.jpg" alt=""></p>