title: Connecting QTableView selectionChanged signal produces segfault with PyQt
body: <p>I have a QTableView in a PyQt application, and I want to keep track of when the selection changes. I've tried connecting the signal to a slot as follows (using the advice on <a href="http://qt-project.org/doc/qt-4.8/qtableview.html" rel="noreferrer">this page</a>:</p>
  
  <pre><code>self.view.selectionModel().selectionChanged.connect(self.selChanged)
  </code></pre>
  
  <p>where the slot it is connected to is defined as:</p>
  
  <pre><code>def selChanged(self, selected, deselected):
          print "Sel changed"
  </code></pre>
  
  <p>However, whenever I load the QMainWindow on which the QTableView resides, I get an immediate segmentation fault.</p>
  
  <p>Am I doing something silly here?</p>