47 idx = self.model().index(row, 0, self.rootIndex()) |
47 idx = self.model().index(row, 0, self.rootIndex()) |
48 if not idx.isValid(): |
48 if not idx.isValid(): |
49 idx = self.model().index(row - 1, 0, self.rootIndex()) |
49 idx = self.model().index(row - 1, 0, self.rootIndex()) |
50 self.selectionModel().select( |
50 self.selectionModel().select( |
51 idx, |
51 idx, |
52 QItemSelectionModel.SelectCurrent | QItemSelectionModel.Rows) |
52 QItemSelectionModel.SelectionFlag.SelectCurrent | |
|
53 QItemSelectionModel.SelectionFlag.Rows) |
53 self.setCurrentIndex(idx) |
54 self.setCurrentIndex(idx) |
54 |
55 |
55 def removeAll(self): |
56 def removeAll(self): |
56 """ |
57 """ |
57 Public method to clear the view. |
58 Public method to clear the view. |