title: PyQt4 filter by text on a QListView using setRowHidden
body: <p>I have a dialog which looks like this:</p>
  
  <p><a href="https://i.stack.imgur.com/wyKg5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wyKg5.png" alt="enter image description here"></a></p>
  
  <p>That dialog has the following code connected to the filter button:</p>
  
  <pre><code>class Dialog(QtGui.QDialog, addWin.Ui_Dialog):
      ...
      self.list = QListView()
      self.filter.clicked.connect(self.filterClicked)
      ...
      def filterClicked(self):
          filter_text = str(self.lineEdit.text()).lower()
          for row in range(self.model.rowCount()):
              if filter_text in str(self.model.item(row).text()).lower():
                  self.list.setRowHidden(row, True)
              else:
                  self.list.setRowHidden(row, False)
  </code></pre>
  
  <p>However, when I click "Filter", nothing happens. What am I missing?</p>