title: how to open widget, have it do something, and close by itself?
body: <p>I am trying to do the following:</p>
  <p>I have a QMainWindow object. From it, I want to open window, have it do something, and close by itself.</p>
  <p>Like start something &gt; open window with &quot;Loading..&quot; message &gt; do the thing &gt; have the window close by itself without interaction from the user.</p>
  <p>I have tried to create a QWidget class and put the &quot;do the thing&quot; method in there, but when I call the .show() method on the QWidget, the whole application hangs and doesn't go further, but maybe I don't understand the logic behind it.</p>
  <p>I am using Python 3.7.7, PyQT5, my OS is Windows 10 x64 (if it's important)</p>