Connect double-click event of QListView with method in PyQt4

It seems to work if:

self.connect(lb, SIGNAL('doubleClicked()'), self.someMethod)

Is replaced with the new syntax of:

lb.doubleClicked.connect(self.someMethod)

The latter is much more elegant too. I still do not know why the original syntax did not work, however.


It will also work if you use:

self.connect(lb,QtCore.SIGNAL("itemDoubleClicked (QListWidgetItem *)"),self.someMethod)

check the pyqt reference, then copy and paste the signal as is.

I know you already solved it. but I think knowing more than one method will be better.