title: Printing multiple lines in a window using PyQT5 and Python
body: <p>I am trying to code a very simple window application. I want it to print some "output" in a part of a window (or in a new one - it doesn't matter).</p>
  
  <p>I will try to better explain my problem using the code below.</p>
  
  <pre><code>import sys
  from PyQt5 import QtCore, QtWidgets
  from PyQt5.QtWidgets import * 
  from PyQt5.QtCore import pyqtSlot, QSize, QRect
  
  class PrintWindow(QMainWindow):
  
      def __init__(self):
          super().__init__()
          self.title='Print many lines'
          self.left=10
          self.top=10
          self.width=640
          self.height=480
          self.initUI()
  
      def initUI(self):
          self.setWindowTitle(self.title)
          self.setGeometry(self.left,self.top,self.width,self.height)
  
          self.statusBar().showMessage('In progress')
  
          label1 = QLabel("Choose how many lines would you like to print:", self)
          label1.setGeometry(QtCore.QRect(label1.x(), label1.y(), label1.width()+150, label1.height()))
          label1.move(10, 20)    
  
          centralWidget = QWidget(self)          
          self.setCentralWidget(centralWidget)  
  
          self.comboBox = QComboBox(centralWidget)
          self.comboBox.setGeometry(QRect(40, 40, 491, 31))
          self.comboBox.setObjectName(("comboBox"))
          self.comboBox.addItem("")
          self.comboBox.addItem("1")
          self.comboBox.addItem("10")
          self.comboBox.addItem("50")
          self.comboBox.addItem("100")
          self.comboBox.move(10, 60)
  
          button_search = QPushButton('PRINT', self)
          button_search.clicked.connect(self.PrintFunction)
          button_search.resize(200,50)
          button_search.move(220,300)  
  
          self.show()
  
      def PrintFunction(self):
          x = self.comboBox.currentText()
          if len(x) == 0:
              x = 0
          else:
              x = int(x)
  
          for i in range(1, x+1):
              print('That is line number: ', i, ' , ', x - i, ' more line(s) to print.')
  
          self.comboBox.setCurrentIndex(0)
  
  if __name__ == '__main__':
  
      app = QApplication(sys.argv)
      window = PrintWindow()
      sys.exit(app.exec_())
  </code></pre>
  
  <p>Basically it does what I want but in the terminal window. I would like a new window in my application to be created (or a TextBox in the same window, whatever) after clicking "PRINT" button with those prints statements.</p>
  
  <p>I am quite new to PyQT5 so I'm looking for simplest solutions (even if they are less effective).</p>
  
  <p>What would you recommend?</p>