title: QThread program is crasing
body: <pre><code>class textProssesThread(QThread):
     def __init__(self,audio):
         super().__init__()
         self.audio = audio
     def run(self):
         text = r.recognize_google(self.audio)
         mainWin.pybutton.setText(text)
  
  class listenThread(QThread):
     def __init__(self):
         super().__init__()
     def run(self) -&gt; None:
         with sr.Microphone() as source:
             audio = r.listen(source)
             a = textProssesThread(audio)
             a.start()
  
  class MainWindow(QMainWindow):
     def __init__(self):
         QMainWindow.__init__(self)
         self.pybutton = QPushButton('Click me', self)
         self.pybutton.clicked.connect(self.clickMethod)
         self.pybutton.resize(100, 32)
         self.pybutton.move(50, 50)
         self.show()
      def clickMethod(self):
         a = listenThread()
         a.start()
  
  if __name__ == &quot;__main__&quot;:
     app = QApplication(sys.argv)
     mainWin = MainWindow()
     sys.exit(app.exec_())
  </code></pre>
  <p>If i call this function program is crashing but if i call in debug mode code is working. What's the wrong here? How i should make this code?</p>