title: pyqt auto connect signal
body: <p>I want use the autoconnection feature. I am using this example:</p>
  
  <p><a href="http://www.eurion.net/python-snippets/snippet/Connecting%20signals%20and%20slots.html" rel="nofollow">http://www.eurion.net/python-snippets/snippet/Connecting%20signals%20and%20slots.html</a></p>
  
  <p>it works, but I want to create my own signals and own slots, the example using built in signals.</p>
  
  <p>for example, here are a custom signal with a custom slot, but don't works:</p>
  
  <pre><code>import sys
  from PyQt4 import QtGui, QtCore
  
  class SignalsAndSlots(QtGui.QWidget):
  
      testSignal = QtCore.pyqtSignal(str,name='testSignal')  
  
  
  
      def __init__(self):
          QtGui.QMainWindow.__init__(self)
          self.setObjectName('testObject')
          self.label = QtGui.QLabel(self)
  
          QtCore.QMetaObject.connectSlotsByName(self)
          self.emitSignal()
  
  
      def emitSignal(self):
          self.testSignal.emit('message')  
  
      @QtCore.pyqtSlot(str,name='on_testObject_testSignal')     
      def autoSlot(self,msg):
          self.label.setText(msg)
  
  if __name__ == "__main__":
      app = QtGui.QApplication(sys.argv)
      gui = SignalsAndSlots()
      gui.show()
      app.exec_()
  </code></pre>
  
  <p>Thanks a lot</p>