title: Connect double-click event of QListView with method in PyQt4
body: <p>I’ve got a PyQt <code>QListView</code> object, and I want a method to run when it is double-clicked. This should be trivial, but it doesn't seem to work. My code is as follows:</p>
  
  <pre><code>class MainWindow(QMainWindow):
      def __init__(self):
          QMainWindow.__init__(self)
          lb = QListView()
          self.connect(lb, SIGNAL('doubleClicked()'), self.someMethod)
  
          grid = QGridLayout()
          grid.addWidget(lb, 0, 0)
          centralWidget.setLayout(grid)
  
      def someMethod(self):
          print "It happened!"
  </code></pre>
  
  <p>I’ve tried <code>clicked()</code> and <code>entered()</code> methods too, but they do not work either. These events are all listed in the <a href="http://pyqt.sourceforge.net/Docs/PyQt4/qabstractitemview.html#doubleClicked" rel="nofollow noreferrer">documentation here</a>.</p>