title: python qt4 - passing arguments in QtCore.QObject.connect
body: <p>I want to react on a mouseclick on a QLabel.<br>
  To achieve this I have redefined the method mouseReleaseEvent of QLabel.<br>
  I want to pass two arguments to the slot:<br>
  - the QtGui.QMouseEvent<br>
  - an ID of the clicked QLabel  </p>
  
  <p>But I can only pass one parameter. Either QtGui.QMouseEvent or the ID.<br>
  The combination does not work.</p>
  
  <pre><code># -*- coding: utf-8 -*-
  
  import sys
  from PyQt4 import QtGui, QtCore
  from PyQt4.QtCore import pyqtSignal
  
  class ExtendedQLabel(QtGui.QLabel):
  
      #labelClickSignal_1 = pyqtSignal(QtGui.QMouseEvent)
      labelClickSignal_1 = pyqtSignal(QtGui.QMouseEvent, int)
      labelClickSignal_2 = pyqtSignal()
  
      def __init(self, parent):
          QtGui.QLabel.__init__(self, parent)
  
      # redefinition 
      def mouseReleaseEvent(self, event):
  
          #self.labelClickSignal_1.emit(event)
          self.labelClickSignal_1.emit(event, 0)
          self.labelClickSignal_2.emit()
  
  
  class Test(QtGui.QMainWindow):
  
      def __init__(self, parent=None):
  
          QtGui.QMainWindow.__init__(self, parent)
  
          self.names = ['Test1', 'Test2', 'Test3']
  
          self.centralWidget = QtGui.QWidget()
          self.setCentralWidget(self.centralWidget)
  
          self.grid = QtGui.QGridLayout(self.centralWidget)
  
          row = 0
          for name in self.names:
              self.addLabel(name, row)
              row = row + 1
  
      def addLabel(self, name, row):
  
          label = ExtendedQLabel(name)
  
          # QtGui.QMouseEvent is automatically passed to the slot
          label.labelClickSignal_1.connect(self.onLabelClicked_1)
  
          # The row ID is passed to the slot
          label.labelClickSignal_2.connect(lambda id = row: 
                                   self.onLabelClicked_2(id))
  
          # *This does not work*
          label.labelClickSignal_1.connect(lambda id = row: 
                                   self.onLabelClicked_3(QtGui.QMouseEvent, id))
  
          self.grid.addWidget(label, row, 1)
  
          row = row + 1
  
      def onLabelClicked_1(self, event):
  
          if event.button() == QtCore.Qt.RightButton:
              print('right')
          else:
              print('left')
  
      def onLabelClicked_2(self, id):
  
          print('Label {0} clicked'.format(id))
  
      def onLabelClicked_3(self, event, id):
  
          # *This does not work*
          if event.button() == QtCore.Qt.RightButton:
              print('right {0}'.format(id))
          else:
              print('left {0}'.format(id))
  
  def main():        
      app = QtGui.QApplication(sys.argv)
  
      t = Test()
      t.show()
  
      sys.exit(app.exec_())
  
  if __name__ == "__main__":
      main()
  </code></pre>