title: pyqt4 emiting signals in threads to slots in main thread
body: <p>I have some custom signals in my main thread that I would like to emit in my other threads but I'm not sure how to connect them. Could someone post an example?</p>
  
  <p>ex:</p>
  
  <pre><code>import sys, time
  from PyQt4 import QtGui as qt
  from PyQt4 import QtCore as qtcore
  
  app = qt.QApplication(sys.argv)
  class widget(qt.QWidget):
      signal = qtcore.pyqtSignal(str)
      def __init__(self, parent=None):
          qt.QWidget.__init__(self)
          self.signal.connect(self.testfunc)
  
      def appinit(self):
          thread = worker()
          thread.start()
  
      def testfunc(self, sigstr):
          print sigstr
  
  class worker(qtcore.QThread):
      def __init__(self):
          qtcore.QThread.__init__(self, parent=app)
  
      def run(self):
          time.sleep(5)
          print "in thread"
          self.emit(qtcore.SIGNAL("signal"),"hi from thread")
  
  def main():
      w = widget()
      w.show()
      qtcore.QTimer.singleShot(0, w.appinit)
      sys.exit(app.exec_())
  
  main()
  </code></pre>
  
  <p>signal never raised.</p>