title: PyQt4 signal does not emit
body: <p>I try to build a udp server to receive binary messages, the socket emits processMsg signal when it received message and the processMsg function tries to emit different signal according to the message type. The QDefines object defines the message type and signal to be generated. I use dict to work around the missing switch/case in python. The problem is that the setRfRsp function didn't execute when UCSI_SET_RF_RSP_E  message recevied.</p>
  
  <p>Main.py file:</p>
  
  <pre><code>class mainWindow(QtGui.QMainWindow):
  def __init__(self, parent = None):
      super(mainWindow, self).__init__()
      self.ui = Ui_MainWindow()
      self.defines = QDefines()
      self.connect(self.defines,QtCore.SIGNAL("signalSetRfRsp(PyQt_PyObject)"), self.setRfRsp)
      self.socket = QUdp(self.localIp, self.localPort, self.remoteIp, self.remotePort)
      self.connect(self.socket, QtCore.SIGNAL("processMsg(int,PyQt_PyObject)"), self.processMsg)
  def setRfRsp(self, msg):
      if msg == 0x00000000:
          print "open"
      else:
          print "closed"
  def processMsg(self, msgType, msg):
      defines = QDefines()
      msg_dict = defines.msgDictGen();
      msg_dict[msgType](msg)
  </code></pre>
  
  <p>defines.py file:</p>
  
  <pre><code>class QDefines(QtCore.QObject):
  UCSI_SET_RF_RSP_E = 0x000d
  def __init__(self, parent = None):
      super(QDefines, self).__init__()
  
  def UCSI_SET_RF_RSP(self, msg):
      self.emit(QtCore.SIGNAL("signalSetRfRsp(PyQt_PyObject)"), msg) 
  
  def msgDictGen(self):
      self.msgDict = {
          self.UCSI_SET_RF_RSP_E : self.UCSI_SET_RF_RSP
      } 
      return self.msgDict
  </code></pre>