title: PyQt5 Run function after displaying window
body: <p>I would like to call a function after the GUI displays. If I run function in <strong>init</strong> it prevents gui from displaying until after it is completed.</p>
  
  <pre><code>class MyApp(QtWidgets.QMainWindow, Ui_MainWindow):
      def __init__(self):
          QtWidgets.QMainWindow.__init__(self)
          Ui_MainWindow.__init__(self)
          self.setupUi(self)
          self.function() #waits for this to finish until gui displayed
      def function(self):
          self.guiBox.setValue(initData)
          #inits stuff, takes 5 seconds
  </code></pre>
  
  <p>The function initializes a piece of equipment via serial port... It takes s few seconds, and it takes gui attributes and updates gui display boxes.</p>