def setCurrentIndex(self, currentIndex):
        """ Sets the current item to be the item at currentIndex.
            Also select the row as to give consistent user feedback.
            See also the notes at the top of this module on current item vs selected item(s).
        """
        selectionModel = self.selectionModel()
        selectionFlags = (QtCore.QItemSelectionModel.ClearAndSelect |
                          QtCore.QItemSelectionModel.Rows)
        selectionModel.setCurrentIndex(currentIndex, selectionFlags)
Sets the current item to be the item at currentIndex.
            Also select the row as to give consistent user feedback.
            See also the notes at the top of this module on current item vs selected item(s).