title: Extra arguments on customContextMenuRequest connect call
body: <p>I have an unusual case of needing to pass an extra argument when defining a connection to a <code>customContextMenuRequested</code> slot in PyQt.</p>
  
  <p>Of course, the basic command is usually done in the form of:</p>
  
  <pre><code>myListWidget.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
  myListWidget.customContextMenuRequested.connect( self.Whatever_Popup )
  </code></pre>
  
  <p>I'm also aware and often use both the lambda and <code>functools.partial</code>
  methods to pass extra arguments to other general functions.
  However, I have a case where I need to pass a <code>QObject</code> (<code>listWidget</code> in this case) when defining the connection.  </p>
  
  <p>The receiving function is structured like so:</p>
  
  <pre><code>def Whatever_Popup(self, pos):
      globalPos = self.mapToGlobal(pos)
      globalPos.setX( globalPos.x() + 720)
      globalPos.setY( globalPos.y() + 115)
  
      menu = QtGui.QMenu()
      menu.addAction("Edit")
  
      selectedItem = menu.exec_(globalPos)
  
      if selectedItem:
          if selectedItem.text() == "Edit":
              print "Here"
              #self.DoEdit(widget)
  </code></pre>
  
  <p>I've tried all the following but with no joy.</p>
  
  <pre><code>myListWidget.customContextMenuRequested.connect( partial(self.Whatever_Popup, newLst))
  
  myListWidget.customContextMenuRequested.connect( partial(self.Whatever_Popup, QtCore.QPoint, newLst))
  
  myListWidget.customContextMenuRequested.connect( partial(self.Whatever_Popup, QtCore.SIGNAL("customContextMenuRequested(const QPoint &amp;)"), newLst))
  
  myListWidget.customContextMenuRequested.connect( lambda: self.Whatever_Popup, (QtCore.SIGNAL("customContextMenuRequested(const QPoint &amp;)"), newLst) )
  </code></pre>
  
  <p>All return an error. Am I close? or is this perhaps not possible? which would be a bit surprising.</p>
  
  <p><code>myListWidget</code> is generated dynamically btw.  I need to pass some reference
  to the <code>listWidget</code> because <code>self.DoEdit(widget)</code> will need it for further processing.  Can't pre-define the name and retrieve it in <code>self.DoEdit</code> since it's created dynamically.
  Does anyone have a solution to this?
  Thanks to all in advance,</p>