title: PyQt Right click Menu for QComboBox
body: <p>I'm trying to extend the QComboClass with a right click menu, and offer it an option to set the current index to -1 (clearing the selection). I'm having trouble invoking the context menu or even the right click event.</p>
  
  <pre><code>class ComboBox(QComboBox):
      def __init__(self, *args, **kwargs):
          super(ComboBox, self).__init__()
          self.setContextMenuPolicy(Qt.CustomContextMenu)
          self.customContextMenuRequested.connect(self.showMenu)
  
      def showMenu(self, pos):
          menu = QMenu()
          clear_action = menu.addAction("Clear Selection", self.clearSelection)
          action = menu.exec_(self.mapToGlobal(pos))
  
      def clearSelection(self):
          self.setCurrentIndex(-1)
  </code></pre>
  
  <p>Could someone tell me what I'm doing wrong?</p>